From 65921ff0ae16598dedbcf8e7bada8abbda6c2f7a Mon Sep 17 00:00:00 2001 From: Nick Gammon Date: Sun, 15 Aug 2010 15:04:43 +1000 Subject: [PATCH] Debug 'summary' will now correctly show variables with newlines in them --- world_debug.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/world_debug.cpp b/world_debug.cpp index 443d907f..bc9deeff 100644 --- a/world_debug.cpp +++ b/world_debug.cpp @@ -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) {