diff --git a/companion/src/modeledit/flightmodes.cpp b/companion/src/modeledit/flightmodes.cpp index c01b540c0..adb162423 100644 --- a/companion/src/modeledit/flightmodes.cpp +++ b/companion/src/modeledit/flightmodes.cpp @@ -229,8 +229,9 @@ void FlightModePanel::update() int idx = phase.rotaryEncoders[i]; FlightModeData *phasere = &phase; while (idx > 1024) { - idx -= 1025; - phasere = &model->flightModeData[idx]; + int nextPhase = idx - 1025; + if (nextPhase >= phaseIdx) nextPhase += 1; + phasere = &model->flightModeData[nextPhase]; idx = phasere->rotaryEncoders[i]; reValues[i]->setDisabled(true); }