Properly walk through lists of (extended) ADGameDescriptions -- we previously only checked the first byte, which 'often' worked fine on little endian machines, but almost never worked correct on big endian ones
svn-id: r24897
This commit is contained in:
parent
559f2b62eb
commit
e0ee3fd06d
1 changed files with 2 additions and 2 deletions
|
@ -127,7 +127,7 @@ DetectedGameList ADVANCED_DETECTOR_DETECT_GAMES_FUNCTION(
|
|||
Common::ADGameDescList descList;
|
||||
const byte *descPtr;
|
||||
|
||||
for (descPtr = descs; *descPtr != 0; descPtr += descItemSize)
|
||||
for (descPtr = descs; ((const ADGameDescription *)descPtr)->gameid != 0; descPtr += descItemSize)
|
||||
descList.push_back((const ADGameDescription *)descPtr);
|
||||
|
||||
ad.registerGameDescriptions(descList);
|
||||
|
@ -166,7 +166,7 @@ int ADVANCED_DETECTOR_DETECT_INIT_GAME(
|
|||
|
||||
Common::String gameid = ConfMan.get("gameid");
|
||||
|
||||
for (descPtr = descs; *descPtr != 0; descPtr += descItemSize)
|
||||
for (descPtr = descs; ((const ADGameDescription *)descPtr)->gameid != 0; descPtr += descItemSize)
|
||||
descList.push_back((const ADGameDescription *)descPtr);
|
||||
|
||||
ad.registerGameDescriptions(descList);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue