From 236fd860159bbd0ada56710da09fad64d3e451fb Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Thu, 27 Apr 2023 06:18:32 -0700 Subject: [PATCH] Fix ConsolePrintFormat() to corrently wrap '\n' --- source/Debugger/Debugger_Console.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Debugger/Debugger_Console.cpp b/source/Debugger/Debugger_Console.cpp index 820e7761..f721e1a4 100644 --- a/source/Debugger/Debugger_Console.cpp +++ b/source/Debugger/Debugger_Console.cpp @@ -140,7 +140,7 @@ void ConsolePrint ( const char * pText ) while ((y < MAX_PUSH_HEIGHT) && (c = *pSrc)) { - if ((c == '\n') || (x >= (CONSOLE_WIDTH - 1))) + if ((c == '\n') || (x >= g_nConsoleDisplayWidth)) { *pDst = 0; x = 0; @@ -158,6 +158,9 @@ void ConsolePrint ( const char * pText ) g_nConsoleBuffer++; } pDst = & g_aConsoleBuffer[ g_nConsoleBuffer ][ 0 ]; + + if (c == '\n') + pSrc++; } else {