mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Fix range check problem for first mode range index.
This commit is contained in:
parent
77e83eef0c
commit
50ba314116
1 changed files with 1 additions and 1 deletions
|
@ -822,7 +822,7 @@ static bool processInCommand(void)
|
||||||
break;
|
break;
|
||||||
case MSP_SET_MODE_RANGE:
|
case MSP_SET_MODE_RANGE:
|
||||||
i = read8();
|
i = read8();
|
||||||
if (i > 0 && i < MAX_MODE_ACTIVATION_CONDITION_COUNT) {
|
if (i < MAX_MODE_ACTIVATION_CONDITION_COUNT) {
|
||||||
modeActivationCondition_t *mac = ¤tProfile->modeActivationConditions[i];
|
modeActivationCondition_t *mac = ¤tProfile->modeActivationConditions[i];
|
||||||
i = read8();
|
i = read8();
|
||||||
const box_t *box = findBoxByActiveBoxId(i);
|
const box_t *box = findBoxByActiveBoxId(i);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue