Skip to content

Commit 65921ff

Browse files
committed
Debug 'summary' will now correctly show variables with newlines in them
1 parent 6ea3fdc commit 65921ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

world_debug.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,10 @@ void CMUSHclientDoc::DebugHelper (const CString strAction, CString strArgument)
19611961

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

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

19661969
if (strContents.GetLength () > 46)
19671970
{

0 commit comments

Comments
 (0)