Crash fix for ESP8266 if mode contains !
This commit is contained in:
parent
cdca715afc
commit
f45082b764
@ -313,12 +313,14 @@ uint8_t extractModeSlider(uint8_t mode, uint8_t slider, char *dest, uint8_t maxL
|
|||||||
case 4: tmpstr = PSTR("FX Custom 3"); break;
|
case 4: tmpstr = PSTR("FX Custom 3"); break;
|
||||||
default: tmpstr = PSTR("FX Custom"); break;
|
default: tmpstr = PSTR("FX Custom"); break;
|
||||||
}
|
}
|
||||||
|
strncpy_P(dest, tmpstr, maxLen); // copy the name into buffer (replacing previous)
|
||||||
|
dest[maxLen-1] = '\0';
|
||||||
} else {
|
} else {
|
||||||
if (nameEnd<0) tmpstr = names.substring(nameBegin).c_str(); // did not find ",", last name?
|
if (nameEnd<0) tmpstr = names.substring(nameBegin).c_str(); // did not find ",", last name?
|
||||||
else tmpstr = names.substring(nameBegin, nameEnd).c_str();
|
else tmpstr = names.substring(nameBegin, nameEnd).c_str();
|
||||||
}
|
|
||||||
strlcpy(dest, tmpstr, maxLen); // copy the name into buffer (replacing previous)
|
strlcpy(dest, tmpstr, maxLen); // copy the name into buffer (replacing previous)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
nameBegin = nameEnd+1; // next name (if "," is not found it will be 0)
|
nameBegin = nameEnd+1; // next name (if "," is not found it will be 0)
|
||||||
} // next slider
|
} // next slider
|
||||||
} else if (slider == 255) {
|
} else if (slider == 255) {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2208032
|
#define VERSION 2208033
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
Loading…
Reference in New Issue
Block a user