[Scummvm-git-logs] scummvm master -> ad47d02f4e18e6158d4e984f12dd10d3ed06e106
criezy
noreply at scummvm.org
Fri Jul 22 23:48:43 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ad47d02f4e AGS: Fix crash in debug builds when detecting ,exe files with non-standard characters
Commit: ad47d02f4e18e6158d4e984f12dd10d3ed06e106
https://github.com/scummvm/scummvm/commit/ad47d02f4e18e6158d4e984f12dd10d3ed06e106
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2022-07-23T00:48:33+01:00
Commit Message:
AGS: Fix crash in debug builds when detecting ,exe files with non-standard characters
Commit 02bd4e46a3 changed AdvancedMetaEngineDetection::composeFileHashMap
to use the punycode-encoded file names, but the AGS engine fallback
detection was still looking for entries in the map using the non-encoded
file names.
This commit both adds punycode-encoding (in case we do have AGS games with
executable that contain non-standard character) and also adds a sanity
checks to avoid crashing if we do have a filename not in the map (which
should not happen, but better safe than sorry).
Changed paths:
engines/ags/detection.cpp
diff --git a/engines/ags/detection.cpp b/engines/ags/detection.cpp
index f745306791b..fa13446a0af 100644
--- a/engines/ags/detection.cpp
+++ b/engines/ags/detection.cpp
@@ -25,6 +25,7 @@
#include "common/md5.h"
#include "common/str-array.h"
#include "common/util.h"
+#include "common/punycode.h"
#include "ags/detection.h"
#include "ags/detection_tables.h"
@@ -152,8 +153,9 @@ ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, c
// Neither, so move on
continue;
+ filename = Common::punycode_encodefilename(filename);
Common::File f;
- if (!f.open(allFiles[filename]))
+ if (!allFiles.contains(filename) || !f.open(allFiles[filename]))
continue;
if (AGS3::isAGSFile(f)) {
More information about the Scummvm-git-logs
mailing list