[Scummvm-cvs-logs] SF.net SVN: scummvm: [30880] scummvm/branches/branch-0-11-0/engines/lure/ res_struct.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Feb 16 06:13:25 CET 2008
Revision: 30880
http://scummvm.svn.sourceforge.net/scummvm/?rev=30880&view=rev
Author: dreammaster
Date: 2008-02-15 21:13:25 -0800 (Fri, 15 Feb 2008)
Log Message:
-----------
Backport of r30879 - bugfix for loading older savegame versions
Modified Paths:
--------------
scummvm/branches/branch-0-11-0/engines/lure/res_struct.cpp
Modified: scummvm/branches/branch-0-11-0/engines/lure/res_struct.cpp
===================================================================
--- scummvm/branches/branch-0-11-0/engines/lure/res_struct.cpp 2008-02-16 05:12:32 UTC (rev 30879)
+++ scummvm/branches/branch-0-11-0/engines/lure/res_struct.cpp 2008-02-16 05:13:25 UTC (rev 30880)
@@ -1209,9 +1209,11 @@
uint8 saveVersion = LureEngine::getReference().saveVersion();
int numEntries = (saveVersion >= 30) ? 3 : 2;
+ reset();
for (int index = 0; index < numEntries; ++index) {
int16 value = stream->readUint16LE();
- _barList[index].currentCustomer = (value == 0) ? NULL : &_barList[index].customers[value - 1];
+ _barList[index].currentCustomer = ((value < 1) || (value > NUM_SERVE_CUSTOMERS)) ? NULL :
+ &_barList[index].customers[value - 1];
for (int ctr = 0; ctr < NUM_SERVE_CUSTOMERS; ++ctr) {
_barList[index].customers[ctr].hotspotId = stream->readUint16LE();
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