Merge pull request #678 from JeffProgrammer/console-stack-fixes

Fixed a leak with console stack in the interpreter.
This commit is contained in:
Brian Roberts 2021-11-20 19:27:33 -06:00 committed by GitHub
commit 01ae95ee4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -696,7 +696,6 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
{
// argc is the local count for eval
gEvalState.pushFrame(NULL, NULL, argc);
gCallStack.pushFrame(0);
popFrame = true;
}
else

View file

@ -1628,9 +1628,9 @@ static ConsoleValue _internalExecute(SimObject *object, S32 argc, ConsoleValue a
ICallMethod *com = dynamic_cast<ICallMethod *>(object);
if(com)
{
gCallStack.pushFrame(0);
ConsoleStackFrameSaver saver;
saver.save();
com->callMethodArgList(argc, argv, false);
gCallStack.popFrame();
}
}