From e5e8947e94c7bf5cd683426b0e169d88ad093735 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 19 Jun 2022 16:10:33 +0200 Subject: [PATCH] [SX127x] Fixed incorrect packet length check in FSK mode --- src/modules/SX127x/SX127x.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/SX127x/SX127x.cpp b/src/modules/SX127x/SX127x.cpp index 7d850e24..261e9814 100644 --- a/src/modules/SX127x/SX127x.cpp +++ b/src/modules/SX127x/SX127x.cpp @@ -472,7 +472,7 @@ int16_t SX127x::startTransmit(uint8_t* data, size_t len, uint8_t addr) { } else if(modem == RADIOLIB_SX127X_FSK_OOK) { // check packet length - if(len >= RADIOLIB_SX127X_MAX_PACKET_LENGTH_FSK) { + if(len > RADIOLIB_SX127X_MAX_PACKET_LENGTH_FSK) { return(RADIOLIB_ERR_PACKET_TOO_LONG); }