[Scummvm-cvs-logs] SF.net SVN: scummvm:[55049] scummvm/trunk/engines/scumm/script_v6.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Mon Dec 27 15:02:17 CET 2010
Revision: 55049
http://scummvm.svn.sourceforge.net/scummvm/?rev=55049&view=rev
Author: Kirben
Date: 2010-12-27 14:02:17 +0000 (Mon, 27 Dec 2010)
Log Message:
-----------
SCUMM: Fix bug #3143039 - ACTIVITY: Circus Stormin' crash.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/script_v6.cpp
Modified: scummvm/trunk/engines/scumm/script_v6.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v6.cpp 2010-12-26 20:44:19 UTC (rev 55048)
+++ scummvm/trunk/engines/scumm/script_v6.cpp 2010-12-27 14:02:17 UTC (rev 55049)
@@ -381,15 +381,17 @@
if (!ah)
return 0;
- // Workaround for a long standing bug where we saved array headers in native
- // endianness, instead of a fixed endianness. We now always store the
- // dimensions in little endian byte order. But to stay compatible with older
- // savegames, we try to detect savegames which were created on a big endian
- // system and convert them to the proper little endian format on the fly.
- if ((FROM_LE_16(ah->dim1) & 0xF000) || (FROM_LE_16(ah->dim2) & 0xF000) || (FROM_LE_16(ah->type) & 0xFF00)) {
- SWAP16(ah->dim1);
- SWAP16(ah->dim2);
- SWAP16(ah->type);
+ if (_game.heversion == 0) {
+ // Workaround for a long standing bug where we saved array headers in native
+ // endianness, instead of a fixed endianness. We now always store the
+ // dimensions in little endian byte order. But to stay compatible with older
+ // savegames, we try to detect savegames which were created on a big endian
+ // system and convert them to the proper little endian format on the fly.
+ if ((FROM_LE_16(ah->dim1) & 0xF000) || (FROM_LE_16(ah->dim2) & 0xF000) || (FROM_LE_16(ah->type) & 0xFF00)) {
+ SWAP16(ah->dim1);
+ SWAP16(ah->dim2);
+ SWAP16(ah->type);
+ }
}
return ah;
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