浏览代码

Fix console garbage error when evaluating strings.

Jeff Hutchinson 4 年之前
父节点
当前提交
9448256422
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Engine/source/console/consoleFunctions.cpp

+ 3 - 1
Engine/source/console/consoleFunctions.cpp

@@ -2410,7 +2410,9 @@ DefineEngineFunction( exec, bool, ( const char* fileName, bool noCalls, bool jou
 
 DefineEngineFunction( eval, const char*, ( const char* consoleString ), , "eval(consoleString)" )
 {
-   return Con::evaluate(consoleString, false, NULL);
+   ConsoleValue returnValue = Con::evaluate(consoleString, false, NULL);
+
+   return Con::getReturnBuffer(returnValue.getString());
 }
 
 DefineEngineFunction( getVariable, const char*, ( const char* varName ), , "(string varName)\n"