From 16617660c31c1084cae049f4d66c4fb360577dd7 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sat, 18 Nov 2023 18:22:47 +0100 Subject: [PATCH] Bugfix (#3533) --- wled00/presets.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/presets.cpp b/wled00/presets.cpp index 58f800d7c..975b68974 100644 --- a/wled00/presets.cpp +++ b/wled00/presets.cpp @@ -212,9 +212,9 @@ void savePreset(byte index, const char* pname, JsonObject sObj) playlistSave = false; if (sObj[F("ql")].is()) strlcpy(quickLoad, sObj[F("ql")].as(), 9); // client limits QL to 2 chars, buffer for 8 bytes to allow unicode - if (sObj["o"].isNull()) { // no "o" means not a playlist or custom API call, saving of state is async (not immediately) - includeBri = sObj["ib"].as() || index==255; // temporary preset needs brightness - segBounds = sObj["sb"].as() || index==255; // temporary preset needs bounds + if (sObj.size()==0 || sObj["o"].isNull()) { // no "o" means not a playlist or custom API call, saving of state is async (not immediately) + includeBri = sObj["ib"].as() || sObj.size()==0 || index==255; // temporary preset needs brightness + segBounds = sObj["sb"].as() || sObj.size()==0 || index==255; // temporary preset needs bounds selectedOnly = sObj[F("sc")].as(); saveLedmap = sObj[F("ledmap")] | -1; } else {