aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-04-11 19:29:55 +0000
committerTorbjörn Andersson2006-04-11 19:29:55 +0000
commit10c62a2eed71061305734fb32e576eaf50918ca9 (patch)
tree65168a50323c8e2267cbbb9eda7efdd886a670ee /engines/scumm
parent7aacf8e5fbf72294715dfea79e96b7c8d736e753 (diff)
downloadscummvm-rg350-10c62a2eed71061305734fb32e576eaf50918ca9.tar.gz
scummvm-rg350-10c62a2eed71061305734fb32e576eaf50918ca9.tar.bz2
scummvm-rg350-10c62a2eed71061305734fb32e576eaf50918ca9.zip
If generateDetectName() generates an empty string, that's a failure, not a
success. Otherwise ScummVM will crash once the game detector reaches the "generic HE game variants", which makes it hard to add non-SCUMM games. svn-id: r21808
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/plugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index ae4356d2af..d02b1da487 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -1278,7 +1278,7 @@ static bool generateDetectName(const GameSettings &g, int method, char *detectNa
case 5:
// FIXME: Fingolfin asks: For which games is this case used?
// Please document this. Also: Why was this case missing in
- // Engine_SCUMM_create ?
+ // Engine_SCUMM_create ?
strcpy(detectName, g.gameid);
break;
case 6:
@@ -1296,6 +1296,9 @@ static bool generateDetectName(const GameSettings &g, int method, char *detectNa
return false;
}
+ if (!detectName[0])
+ return false;
+
return true;
}