소스 검색

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

Fixed a leak with console stack in the interpreter.
Brian Roberts 3 년 전
부모
커밋
01ae95ee4b
2개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 1
      Engine/source/console/compiledEval.cpp
  2. 2 2
      Engine/source/console/console.cpp

+ 0 - 1
Engine/source/console/compiledEval.cpp

@@ -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

+ 2 - 2
Engine/source/console/console.cpp

@@ -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();
       }
    }