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/scott | |
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/scott')
-rw-r--r-- | engines/glk/scott/detection.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/glk/scott/detection.cpp b/engines/glk/scott/detection.cpp index 0e89b13f86..e2c98723c4 100644 --- a/engines/glk/scott/detection.cpp +++ b/engines/glk/scott/detection.cpp @@ -54,9 +54,11 @@ bool ScottMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g 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; Common::File gameFile; if (!gameFile.open(*file)) @@ -67,7 +69,7 @@ bool ScottMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g isBlorb = Blorb::isBlorb(gameFile, ID_SAAI); gameFile.close(); - if (!hasExt && !isBlorb) + if (!isBlorb && Blorb::hasBlorbExt(filename)) continue; // Scan through the Scott game list for a match |