From 6796d1c3f3548cdb1e7eb2b14a2b3d5d50352f9a Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Wed, 10 Apr 2024 21:14:45 -0400 Subject: [PATCH] ensure length accounts for frame header; --- SerialPort.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SerialPort.cpp b/SerialPort.cpp index 5e73774..2958f17 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -530,6 +530,7 @@ void SerialPort::writeP25Data(const uint8_t* data, uint16_t length) writeInt(1U, reply, length + 3U); } else { + length += 4U; reply[0U] = DVM_LONG_FRAME_START; reply[1U] = (length >> 8U) & 0xFFU; reply[2U] = (length & 0xFFU);