From c340a1d47f98ee4751491c12fe0bcd11fa897082 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Wed, 15 Nov 2023 18:04:14 +0100 Subject: [PATCH] Bugfix (#3526) --- wled00/json.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wled00/json.cpp b/wled00/json.cpp index 55e382a0..6a28a19d 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -501,7 +501,8 @@ void serializeSegment(JsonObject& root, Segment& seg, byte id, bool forPreset, b root["cct"] = seg.cct; root[F("set")] = seg.set; - if (segmentBounds && seg.name != nullptr) root["n"] = reinterpret_cast(seg.name); //not good practice, but decreases required JSON buffer + if (seg.name != nullptr) root["n"] = reinterpret_cast(seg.name); //not good practice, but decreases required JSON buffer + else if (forPreset) root["n"] = ""; // to conserve RAM we will serialize the col array manually // this will reduce RAM footprint from ~300 bytes to 84 bytes per segment