From d63b4d16619d7f938c58c56606ee4fa8f65b7a53 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 18 Sep 2024 17:47:43 +0200 Subject: [PATCH] correctly terminate the current logbuffer when partially written --- lib/channel/GwChannelList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/channel/GwChannelList.cpp b/lib/channel/GwChannelList.cpp index a118f13d..c736ae28 100644 --- a/lib/channel/GwChannelList.cpp +++ b/lib/channel/GwChannelList.cpp @@ -72,7 +72,7 @@ class GwSerialLog : public GwLogWriter if (handled > 0){ memmove(logBuffer,logBuffer+handled,wp-handled); wp-=handled; - logBuffer[handled]=0; + logBuffer[wp]=0; } return; }