Fix foreach over non-existant objects

This commit is contained in:
Lukas Aldershaab 2023-09-24 20:55:16 +02:00 committed by Brian Roberts
parent f405666cbc
commit c6047b24eb
2 changed files with 41 additions and 0 deletions

View file

@ -2121,6 +2121,8 @@ Con::EvalResult CodeBlock::exec(U32 ip, const char* functionName, Namespace* thi
Con::errorf(ConsoleLogEntry::General, "No SimSet object '%s'", stack[_STK].getString());
Con::errorf(ConsoleLogEntry::General, "Did you mean to use 'foreach$' instead of 'foreach'?");
ip = failIp;
// Pop the iterated value
_STK--;
continue;
}