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
This commit is contained in:
Torbjörn Andersson 2006-04-11 19:29:55 +00:00
parent 7aacf8e5fb
commit 10c62a2eed

View File

@ -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;
}