mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 23:44:22 +00:00
Fixed nasty bug in findPlainGameDescriptor -- contrary to is documentation, it would not return 0 upon failure to find a match, but rather a (0,0) record.
svn-id: r33136
This commit is contained in:
parent
a49a3c6aaa
commit
22ab05aa8a
@ -32,10 +32,10 @@ const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const Pla
|
||||
const PlainGameDescriptor *g = list;
|
||||
while (g->gameid) {
|
||||
if (0 == scumm_stricmp(gameid, g->gameid))
|
||||
break;
|
||||
return g;
|
||||
g++;
|
||||
}
|
||||
return g;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void GameDescriptor::updateDesc(const char *extra) {
|
||||
|
@ -48,7 +48,7 @@ struct PlainGameDescriptor {
|
||||
/**
|
||||
* Given a list of PlainGameDescriptors, returns the first PlainGameDescriptor
|
||||
* matching the given gameid. If not match is found return 0.
|
||||
* The end of the list marked by a PlainGameDescriptor with gameid equal to 0.
|
||||
* The end of the list must marked by a PlainGameDescriptor with gameid equal to 0.
|
||||
*/
|
||||
const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user