From e97be1b836d6ff6803eef5ecbc442043da25d8d9 Mon Sep 17 00:00:00 2001 From: tomcw Date: Sun, 3 Apr 2022 18:49:32 +0100 Subject: [PATCH] Debugger: fix console output for 'disk info' cmd . fix to ConsoleBufferPush() which was skipping a char when the line needed to output to a 2nd line --- source/Debugger/Debugger_Console.cpp | 3 ++- source/Disk.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Debugger/Debugger_Console.cpp b/source/Debugger/Debugger_Console.cpp index e5fa6224..a22932b5 100644 --- a/source/Debugger/Debugger_Console.cpp +++ b/source/Debugger/Debugger_Console.cpp @@ -292,7 +292,8 @@ void ConsoleBufferPush ( const char * pText ) { g_nConsoleBuffer++; } - pSrc++; + if (c == '\n') + pSrc++; pDst = & g_aConsoleBuffer[ g_nConsoleBuffer ][ 0 ]; } else diff --git a/source/Disk.cpp b/source/Disk.cpp index 8dd5a6aa..e4cf7a24 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -106,7 +106,7 @@ std::string Disk2InterfaceCard::FormatPhaseString(float phase) const UINT phaseInt = (UINT)phase; const UINT phaseFrac = (UINT)((phase - (float)phaseInt) * 100 + 0.5); - return StrFormat("%02X.%2d", phaseInt, phaseFrac); // "$NN.nn" + return StrFormat("%02X.%02d", phaseInt, phaseFrac); // "$NN.nn" } std::string Disk2InterfaceCard::GetCurrentTrackString(void)