1
0
forked from 0ad/0ad

Remove length limits on script output in console.

This was SVN commit r15224.
This commit is contained in:
Ykkrosh 2014-05-26 13:39:45 +00:00
parent b78c38b935
commit 1936abad98
3 changed files with 5 additions and 5 deletions

View File

@ -607,7 +607,7 @@ void CConsole::ProcessBuffer(const wchar_t* szLine)
CScriptVal rval;
g_GUI->GetActiveGUI()->GetScriptInterface()->Eval(szLine, rval);
if (!rval.undefined())
InsertMessage(L"%ls", g_GUI->GetActiveGUI()->GetScriptInterface()->ToString(rval.get()).c_str());
InsertMessageRaw(g_GUI->GetActiveGUI()->GetScriptInterface()->ToString(rval.get()));
}
void CConsole::LoadHistory()

View File

@ -75,6 +75,9 @@ public:
void InsertMessage(const wchar_t* szMessage, ...) WPRINTF_ARGS(2);
void InsertChar(const int szChar, const wchar_t cooked);
// Insert message without printf-style formatting, and without length limits
void InsertMessageRaw(const CStrW& message);
void ReceivedChatMessage(const wchar_t *pSender, const wchar_t *szMessage);
void SetBuffer(const wchar_t* szMessage);
@ -140,9 +143,6 @@ private:
void ProcessBuffer(const wchar_t* szLine);
// Insert message without printf-style formatting, and without length limits
void InsertMessageRaw(const CStrW& message);
void LoadHistory();
void SaveHistory();
};

View File

@ -50,7 +50,7 @@ void JSI_Console::Write(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), std::wst
{
if (!CheckGlobalInitialized())
return;
g_Console->InsertMessage(L"%ls", output.c_str());
g_Console->InsertMessageRaw(output);
}
void JSI_Console::RegisterScriptFunctions(ScriptInterface& scriptInterface)