Skip to content

Commit

Permalink
Merge pull request #5 from reissjason/patch-2
Browse files Browse the repository at this point in the history
Channel index verification should use OR
  • Loading branch information
mluis1 committed Jun 8, 2015
2 parents dba371f + bc865a9 commit d9a0998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mac/LoRaMac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ static void LoRaMacProcessMacCommands( uint8_t *payload, uint8_t macIndex, uint8
chParam.Frequency *= 100;
chParam.DrRange.Value = payload[macIndex++];

if( ( channelIndex < 3 ) && ( channelIndex > LORA_MAX_NB_CHANNELS ) )
if( ( channelIndex < 3 ) || ( channelIndex > LORA_MAX_NB_CHANNELS ) )
{
status &= 0xFE; // Channel frequency KO
}
Expand Down

0 comments on commit d9a0998

Please sign in to comment.