aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2011-01-17 12:09:06 +0000
committerSven Hesse2011-01-17 12:09:06 +0000
commit6c6d85908fd475eb6c32031f3fdfa16bd5bae3d9 (patch)
tree7ebe390e56b74ecb523aa086fdfe43581243adfc /engines
parentda65a3cbf39cf23e4b803bfe9b498d0c5e1c36ec (diff)
downloadscummvm-rg350-6c6d85908fd475eb6c32031f3fdfa16bd5bae3d9.tar.gz
scummvm-rg350-6c6d85908fd475eb6c32031f3fdfa16bd5bae3d9.tar.bz2
scummvm-rg350-6c6d85908fd475eb6c32031f3fdfa16bd5bae3d9.zip
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. svn-id: r55276
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/inter_v2.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index d8d36d7a41..1707e614ce 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -626,12 +626,14 @@ void Inter_v2::o2_pushVars() {
_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;
}