From 1b76582dcb12b0230797584ebacea2ab0c2892ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Fri, 22 Aug 2025 20:14:06 +0200 Subject: [PATCH] accept loglines with either \n or \r\n at the end --- .../LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.cpp b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.cpp index 0eac15f..0496282 100644 --- a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.cpp +++ b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.cpp @@ -224,7 +224,7 @@ void LibreVNAUSBDriver::ReceivedLog() auto firstLinebreak = (uint8_t*) memchr(logBuffer->getBuffer(), '\n', logBuffer->getReceived()); if(firstLinebreak) { handled_len = firstLinebreak - logBuffer->getBuffer(); - auto line = QString::fromLatin1((const char*) logBuffer->getBuffer(), handled_len - 1); + auto line = QString::fromLatin1((const char*) logBuffer->getBuffer(), handled_len).trimmed(); emit LogLineReceived(line); logBuffer->removeBytes(handled_len + 1); }