mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-18 19:00:21 +02:00
Fixed OPCODE_STORE_FIELD_REF incorrectly not skipping field on exception
It would cause invalid opcode afterwards.
This commit is contained in:
1 file changed
+1
-1
@@ -1512,7 +1512,6 @@ void ScriptVM::Execute(ScriptVariable *data, int dataSize, str label)
|
||||
|
||||
if (listener == nullptr) {
|
||||
fieldNameIndex = fetchActualOpcodeValue<op_name_t>();
|
||||
skipField();
|
||||
ScriptError(
|
||||
"Field '%s' applied to NULL listener", Director.GetString(fieldNameIndex).c_str()
|
||||
);
|
||||
@@ -1527,6 +1526,7 @@ void ScriptVM::Execute(ScriptVariable *data, int dataSize, str label)
|
||||
} catch (...) {
|
||||
ScriptVariable *const pTop = m_VMStack.GetTopPtr();
|
||||
pTop->setRefValue(pTop);
|
||||
skipField();
|
||||
throw;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user