From 3eec7d741c8c8a073c97e1b2d9f1f96368ab267f Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Sun, 27 Jan 2019 20:40:21 -0300 Subject: [PATCH] Fix Wires-X SEARCH reply length --- YSFGateway/WiresX.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/YSFGateway/WiresX.cpp b/YSFGateway/WiresX.cpp index e16fd5d..f50226f 100644 --- a/YSFGateway/WiresX.cpp +++ b/YSFGateway/WiresX.cpp @@ -850,6 +850,12 @@ void CWiresX::sendSearchReply() data[offset + 49U] = 0x0DU; } + unsigned int k = 1029U - offset; + for(unsigned int i = 0U; i < k; i++) + data[i + offset] = 0x20U; + + offset += k; + data[offset + 0U] = 0x03U; // End of data marker data[offset + 1U] = CCRC::addCRC(data, offset + 1U);