We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5322dd1 commit 2226826Copy full SHA for 2226826
src/lmic/lmic.c
@@ -711,7 +711,7 @@ static CONST_TABLE(u1_t, macCmdSize)[] = {
711
static u1_t getMacCmdSize(u1_t macCmd) {
712
if (macCmd < 2)
713
return 0;
714
- if (macCmd >= LENOF_TABLE(macCmdSize) - 2)
+ if ((macCmd - 2) >= LENOF_TABLE(macCmdSize))
715
716
return TABLE_GET_U1(macCmdSize, macCmd - 2);
717
}
0 commit comments