From 6df64d0d31bfb4862dd46bfadd83abe39b04f974 Mon Sep 17 00:00:00 2001 From: Jeff Cooper Date: Tue, 9 Nov 2021 18:29:04 -0500 Subject: [PATCH] Fix a bug which prevents DMX channel mappings from loading correctly. (#1525) (#2328) --- wled00/cfg.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 95ffd708..20bcdbd8 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -396,11 +396,9 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { CJSON(DMXStartLED,dmx[F("start-led")]); JsonArray dmx_fixmap = dmx[F("fixmap")]; - it = 0; - for (int i : dmx_fixmap) { - if (it > 14) break; + for (int i = 0; i < dmx_fixmap.size(); i++) { + if (i > 14) break; CJSON(DMXFixtureMap[i],dmx_fixmap[i]); - it++; } #endif