minor bugfixes as suggested by the rabbit

- PulLightControl UM: dont release a lock you do not own
- off-by-one error in extractModeSlider (used only in rotary in UM)
- safety check in playlist in case something goes horribly wrong
This commit is contained in:
Damian Schneider
2025-12-29 12:56:06 +01:00
parent 1c2cacf185
commit fa868568af
3 changed files with 3 additions and 3 deletions

View File

@@ -89,7 +89,8 @@ int16_t loadPlaylist(JsonObject playlistObj, byte presetId) {
it++;
}
}
for (int i = it; i < playlistLen; i++) playlistEntries[i].dur = playlistEntries[it -1].dur;
if (it > 0) // should never happen but just in case
for (int i = it; i < playlistLen; i++) playlistEntries[i].dur = playlistEntries[it -1].dur;
it = 0;
JsonArray tr = playlistObj[F("transition")];