Skip to content

Commit

Permalink
Debug 'summary' will now correctly show variables with newlines in them
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Aug 15, 2010
1 parent 6ea3fdc commit 65921ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion world_debug.cpp
Expand Up @@ -1961,7 +1961,10 @@ void CMUSHclientDoc::DebugHelper (const CString strAction, CString strArgument)

GetVariableMap ().GetNextAssoc (pos, strVariableName, pVariable);

CString strContents = Replace (pVariable->strContents, ENDLINE, "\\n", true);
// first get rid of carriage-returns
CString strContents = Replace (pVariable->strContents, "\r", "", true);
// now show newlines as \n
strContents = Replace (strContents, "\n", "\\n", true);

if (strContents.GetLength () > 46)
{
Expand Down

0 comments on commit 65921ff

Please sign in to comment.