Skip to content

Commit 34f68ba

Browse files
author
Daniel Jäckle
committed
Bug fix in function OnRadioRxDone. At this location, we must decrease the commandsSize by 1, since it was increased previously by the size of the fport.
1 parent 14877f1 commit 34f68ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mac/LoRaMac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,8 @@ static void OnRadioRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t
12491249
{
12501250
if( fCtrl.Bits.FOptsLen > 0 )
12511251
{
1252-
// Decode Options field MAC commands
1253-
ProcessMacCommands( payload, 8, appPayloadStartIndex, snr );
1252+
// Decode Options field MAC commands. Omit the fPort.
1253+
ProcessMacCommands( payload, 8, appPayloadStartIndex - 1, snr );
12541254
}
12551255

12561256
LoRaMacPayloadDecrypt( payload + appPayloadStartIndex,

0 commit comments

Comments
 (0)