1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Fix range check problem for first mode range index.

This commit is contained in:
Dominic Clifton 2014-10-12 23:43:12 +01:00
parent 77e83eef0c
commit 50ba314116

View file

@ -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 = &currentProfile->modeActivationConditions[i]; modeActivationCondition_t *mac = &currentProfile->modeActivationConditions[i];
i = read8(); i = read8();
const box_t *box = findBoxByActiveBoxId(i); const box_t *box = findBoxByActiveBoxId(i);