mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-19 00:00:24 +02:00
Always cast targetlist to const array value, so the iteration remains untouched
This commit is contained in:
1 file changed
+1
@@ -644,6 +644,7 @@ void ScriptVM::execCmdMethodCommon(op_parmNum_t param)
|
||||
// because if it's a targetlist, the container object can be modified
|
||||
// while iterating
|
||||
ScriptVariable array = a;
|
||||
array.CastConstArrayValue();
|
||||
|
||||
for (uintptr_t i = arraysize; i > 0; i--) {
|
||||
Listener *const listener = array.listenerAt(i);
|
||||
|
||||
Reference in new issue
Block a user