Skip to content

Commit 9db1022

Browse files
authored
ledmap parser bugfix
make our custom parser robust against pretty printed ledmap.json expected <"map":[> but user file had <"map": [>
1 parent 617ea8f commit 9db1022

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

wled00/FX_fcn.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2709,7 +2709,8 @@ bool WS2812FX::deserializeMap(uint8_t n) {
27092709
for (unsigned i=0; i<customMappingTableSize; i++) customMappingTable[i]=i; // "neutral" 1:1 mapping
27102710

27112711
//WLEDMM: find the map values
2712-
f.find("\"map\":[");
2712+
f.find("\"map\":");
2713+
f.readBytesUntil('[', fileName, sizeof(fileName)-1); // drop everything until "["
27132714
uint16_t i=0;
27142715
do { //for each element in the array
27152716
int mapi = f.readStringUntil(',').toInt();

0 commit comments

Comments
 (0)