[Scummvm-cvs-logs] SF.net SVN: scummvm: [24897] scummvm/trunk/common/advancedDetector.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Dec 20 00:58:49 CET 2006
Revision: 24897
http://scummvm.svn.sourceforge.net/scummvm/?rev=24897&view=rev
Author: fingolfin
Date: 2006-12-19 15:58:45 -0800 (Tue, 19 Dec 2006)
Log Message:
-----------
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
Modified Paths:
--------------
scummvm/trunk/common/advancedDetector.cpp
Modified: scummvm/trunk/common/advancedDetector.cpp
===================================================================
--- scummvm/trunk/common/advancedDetector.cpp 2006-12-19 23:57:04 UTC (rev 24896)
+++ scummvm/trunk/common/advancedDetector.cpp 2006-12-19 23:58:45 UTC (rev 24897)
@@ -127,7 +127,7 @@
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 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list