From 08bb513c7b3eaa6db00b85998c62a5c89582d871 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 15 Oct 2024 10:08:11 +0200 Subject: [PATCH] Minor: set recBuf to a definite value --- src/prot.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/prot.cpp b/src/prot.cpp index ca1e397..e242690 100755 --- a/src/prot.cpp +++ b/src/prot.cpp @@ -368,6 +368,9 @@ uint8_t recBuffer[FRAME_MAXLEN]; // read from "VCP": mySerialPort->readFromSerial(Indata, recLength); //qDebug()<<"prot: got data " << recLength; + + memset(recBuffer, 0x00, sizeof(recBuffer)); + if (recLength>FRAME_MAXLEN) recLength=FRAME_MAXLEN; for (int nn=0; nn