[Scummvm-cvs-logs] SF.net SVN: scummvm:[55276] scummvm/trunk/engines/gob/inter_v2.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Mon Jan 17 13:09:08 CET 2011


Revision: 55276
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55276&view=rev
Author:   drmccoy
Date:     2011-01-17 12:09:06 +0000 (Mon, 17 Jan 2011)

Log Message:
-----------
GOB: Fix o2_pushVars()

Fixes Urban Runner loading.
This being broken has the potential of messing up
/everything/ in unpredictable ways, so saves of games using
this opcode may be borked. Thankfully, I *think* it's just
Urban Runner, which isn't working/supported yet anyway.

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter_v2.cpp

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2011-01-17 09:48:42 UTC (rev 55275)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2011-01-17 12:09:06 UTC (rev 55276)
@@ -626,12 +626,14 @@
 			_varStack[_varStackPos] = _vm->_global->_inter_animDataSize * 4;
 
 		} else {
-			int32 n = _vm->_game->_script->getResultInt();
+			int16 value;
 
-			if (_vm->_game->_script->evalExpr(&varOff) != 20)
-				n = 0;
+			if (_vm->_game->_script->evalExpr(&value) != 20)
+				value = 0;
 
-			memcpy(_varStack + _varStackPos, &n, 4);
+			uint32 value32 = ((uint16) value);
+
+			memcpy(_varStack + _varStackPos, &value32, 4);
 			_varStackPos += 4;
 			_varStack[_varStackPos] = 4;
 		}


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