diff options
author | Cameron Cawley | 2019-03-31 19:46:16 +0100 |
---|---|---|
committer | Paul Gilbert | 2019-03-31 16:37:47 -0700 |
commit | 280a4f2d911d10f8199a88805fae6966ac00f44b (patch) | |
tree | b3d84b0f23517c5c47700d944c4d49afff30a3ea /engines/glk/tads | |
parent | 7b4c6d6a35f00e46d9021b236393a40aa54e6a6e (diff) | |
download | scummvm-rg350-280a4f2d911d10f8199a88805fae6966ac00f44b.tar.gz scummvm-rg350-280a4f2d911d10f8199a88805fae6966ac00f44b.tar.bz2 scummvm-rg350-280a4f2d911d10f8199a88805fae6966ac00f44b.zip |
GLK: Only check the format of a Blorb file if it has a valid file extension
Diffstat (limited to 'engines/glk/tads')
-rw-r--r-- | engines/glk/tads/detection.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/glk/tads/detection.cpp b/engines/glk/tads/detection.cpp index 92633dacef..4df6d25796 100644 --- a/engines/glk/tads/detection.cpp +++ b/engines/glk/tads/detection.cpp @@ -68,9 +68,11 @@ bool TADSMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &ga continue; Common::String filename = file->getName(); - bool hasExt = false, isBlorb = false; + bool hasExt = Blorb::hasBlorbExt(filename), isBlorb = false; for (const char *const *ext = &EXTENSIONS[0]; *ext && !hasExt; ++ext) hasExt = filename.hasSuffixIgnoreCase(*ext); + if (!hasExt) + continue; // Open up the file and calculate the md5 Common::File gameFile; @@ -82,7 +84,7 @@ bool TADSMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &ga isBlorb = Blorb::isBlorb(gameFile, ID_TAD2) || Blorb::isBlorb(gameFile, ID_TAD3); gameFile.close(); - if (!hasExt && !isBlorb) + if (!isBlorb && Blorb::hasBlorbExt(filename)) continue; // Check for known games |