From 722008570a9e2141f6b3b5ad7744b474f8ab2751 Mon Sep 17 00:00:00 2001 From: Nathan Bowhay Date: Mon, 2 Feb 2015 12:02:56 -0800 Subject: [PATCH] Fixed bug with console expression result Fixed a bug with the result of a console expression not always displaying. --- Engine/source/gui/controls/guiConsoleTextCtrl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine/source/gui/controls/guiConsoleTextCtrl.cpp b/Engine/source/gui/controls/guiConsoleTextCtrl.cpp index 617099646..f7242e3a2 100644 --- a/Engine/source/gui/controls/guiConsoleTextCtrl.cpp +++ b/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 );