diff options
| author | Max Horn | 2006-12-19 23:58:45 +0000 |
|---|---|---|
| committer | Max Horn | 2006-12-19 23:58:45 +0000 |
| commit | e0ee3fd06d9d547715139d89f896dda96561df12 (patch) | |
| tree | 4d35acf9349006a62234357789872c68ddcc2cab | |
| parent | 559f2b62ebfa57ce316825aee2da4664e244877d (diff) | |
| download | scummvm-rg350-e0ee3fd06d9d547715139d89f896dda96561df12.tar.gz scummvm-rg350-e0ee3fd06d9d547715139d89f896dda96561df12.tar.bz2 scummvm-rg350-e0ee3fd06d9d547715139d89f896dda96561df12.zip | |
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
| -rw-r--r-- | common/advancedDetector.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp index 9d24fb22d6..afa97935d6 100644 --- a/common/advancedDetector.cpp +++ b/common/advancedDetector.cpp @@ -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); |
