Explorar o código

Fixed bug with console expression result

Fixed a bug with the result of a console expression not always
displaying.
Nathan Bowhay %!s(int64=10) %!d(string=hai) anos
pai
achega
722008570a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Engine/source/gui/controls/guiConsoleTextCtrl.cpp

+ 3 - 0
Engine/source/gui/controls/guiConsoleTextCtrl.cpp

@@ -115,6 +115,9 @@ void GuiConsoleTextCtrl::onPreRender()
    {
       mResult = Con::evaluatef( "$guiConsoleTextCtrlTemp = %s;", mConsoleExpression.c_str() );
       
+      //Fixes a bug with the above not always grabbing the console text.
+      mResult = Con::getVariable("$guiConsoleTextCtrlTemp");
+      
       // Of the resulting string we will be printing,
       // Find the number of lines and length of each.      
       mProfile->mFont->wrapString( mResult, U32_MAX, mStartLineOffset, mLineLen );