fix(radio): potential crash if too many telemetry sensors discovered (#6288)

This commit is contained in:
philmoz
2025-05-25 12:43:28 +10:00
committed by GitHub
parent dc0d85d035
commit 58d457b24b
6 changed files with 33 additions and 27 deletions
+5 -1
View File
@@ -56,7 +56,7 @@
#endif
TelemetryItem telemetryItems[MAX_TELEMETRY_SENSORS];
uint8_t allowNewSensors;
bool allowNewSensors;
bool isFaiForbidden(source_t idx)
{
@@ -597,7 +597,11 @@ int setTelemetryValue(TelemetryProtocol protocol, uint16_t id, uint8_t subId,
return index;
}
else {
allowNewSensors = false;
#if !defined(COLORLCD)
// Not safe on color LCD - handled in telemetry page instead
POPUP_WARNING(STR_TELEMETRYFULL);
#endif
return -1;
}
}