diff options
-rw-r--r-- | engines/gob/inter_v2.cpp | 10 |
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; } |