Skip to content

Commit 3020658

Browse files
authored
Update RF24.cpp (mysensors#1569)
Fix mysensors#1568
1 parent e298769 commit 3020658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hal/transport/RF24/driver/RF24.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ LOCAL uint8_t RF24_getDynamicPayloadSize(void)
348348
{
349349
uint8_t result = RF24_spiMultiByteTransfer(RF24_CMD_READ_RX_PL_WID, NULL, 1, true);
350350
// check if payload size invalid
351-
if(result > 32) {
351+
if(result > 32 || !result) {
352352
RF24_DEBUG(PSTR("!RF24:GDP:PYL INV\n")); // payload len invalid
353353
RF24_flushRX();
354354
result = 0;

0 commit comments

Comments
 (0)