diff --git a/wled00/util.cpp b/wled00/util.cpp index f14e686b2..990500f2f 100644 --- a/wled00/util.cpp +++ b/wled00/util.cpp @@ -313,11 +313,13 @@ uint8_t extractModeSlider(uint8_t mode, uint8_t slider, char *dest, uint8_t maxL case 4: tmpstr = PSTR("FX Custom 3"); break; default: tmpstr = PSTR("FX Custom"); break; } + strncpy_P(dest, tmpstr, maxLen); // copy the name into buffer (replacing previous) + dest[maxLen-1] = '\0'; } else { if (nameEnd<0) tmpstr = names.substring(nameBegin).c_str(); // did not find ",", last name? 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) } // next slider diff --git a/wled00/wled.h b/wled00/wled.h index 934a18d9a..0a3f93ad0 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // 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 //#define WLED_USE_MY_CONFIG