aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorBen Castricum2012-04-23 18:51:15 +0200
committerBen Castricum2012-04-28 11:10:53 +0200
commitbdb12a9c658fa0e8661c7a8370f1d926ed31ae62 (patch)
tree106479ef08841134c07fe8e6dc1001f3d645771e /engines/scumm
parent4d6f2875de900ea41663b99be0f148096561bf5d (diff)
downloadscummvm-rg350-bdb12a9c658fa0e8661c7a8370f1d926ed31ae62.tar.gz
scummvm-rg350-bdb12a9c658fa0e8661c7a8370f1d926ed31ae62.tar.bz2
scummvm-rg350-bdb12a9c658fa0e8661c7a8370f1d926ed31ae62.zip
SCUMM: Fix bug #3493317 by removing assert() in detection algorithm.
Bug #3493317 ("SCUMM: Detecting Loom PCE without 16bpp support crashes") is caused by an assert() in detection algorithm. In case an MD5 is found the md5table, but the variant from the md5table is not found in detection_tables.h this assert triggers. However since certain variants can be left out compile-time this situation can occur. By ignoring instead of assert()-ing the entry ScummVM will no longer abort but continue the detection process.
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/detection.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index b47982af00..2da0abb5df 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -589,11 +589,11 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
file.c_str(), md5str.c_str(), filesize);
// Sanity check: We *should* have found a matching gameid / variant at this point.
- // If not, then there's a bug in our data tables...
- assert(dr.game.gameid != 0);
-
- // Add it to the list of detected games
- results.push_back(dr);
+ // If not, we may have #ifdef'ed the entry out in our detection_tables.h because we
+ // don't have the required stuff compiled in, or there's a bug in our data tables...
+ if (dr.game.gameid != 0)
+ // Add it to the list of detected games
+ results.push_back(dr);
}
}