diff options
-rw-r--r-- | engines/gob/inter_v1.cpp | 8 | ||||
-rw-r--r-- | engines/gob/inter_v2.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 7638296a49..1df261d7ab 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1323,13 +1323,13 @@ bool Inter_v1::o1_if(OpFuncParams ¶ms) { } bool Inter_v1::o1_assign(OpFuncParams ¶ms) { - byte *savedPos = _vm->_global->_inter_execPtr; + byte destType = *_vm->_global->_inter_execPtr; int16 dest = _vm->_parse->parseVarIndex(); int16 result; - int16 type = evalExpr(&result); + int16 srcType = evalExpr(&result); - switch (savedPos[0]) { + switch (destType) { case TYPE_VAR_INT32: case TYPE_ARRAY_INT32: WRITE_VAR_OFFSET(dest, _vm->_global->_inter_resVal); @@ -1337,7 +1337,7 @@ bool Inter_v1::o1_assign(OpFuncParams ¶ms) { case TYPE_VAR_STR: case TYPE_ARRAY_STR: - if (type == TYPE_IMM_INT16) + if (srcType == TYPE_IMM_INT16) WRITE_VARO_UINT8(dest, result); else WRITE_VARO_STR(dest, _vm->_global->_inter_resStr); diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 3b54f1e0ee..e92d6ce077 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1589,7 +1589,7 @@ void Inter_v2::o2_resetImdFrontSurf() { } bool Inter_v2::o2_assign(OpFuncParams ¶ms) { - byte *savedPos = _vm->_global->_inter_execPtr; + byte destType = *_vm->_global->_inter_execPtr; int16 dest = _vm->_parse->parseVarIndex(); byte loopCount; @@ -1601,9 +1601,9 @@ bool Inter_v2::o2_assign(OpFuncParams ¶ms) { for (int i = 0; i < loopCount; i++) { int16 result; - int16 type = evalExpr(&result); + int16 srcType = evalExpr(&result); - switch (savedPos[0]) { + switch (destType) { case TYPE_VAR_INT8: case TYPE_ARRAY_INT8: WRITE_VARO_UINT8(dest + i, _vm->_global->_inter_resVal); @@ -1625,7 +1625,7 @@ bool Inter_v2::o2_assign(OpFuncParams ¶ms) { case TYPE_VAR_STR: case TYPE_ARRAY_STR: - if (type == TYPE_IMM_INT16) + if (srcType == TYPE_IMM_INT16) WRITE_VARO_UINT8(dest, result); else WRITE_VARO_STR(dest, _vm->_global->_inter_resStr); |