mirror of
https://github.com/wled/WLED.git
synced 2025-07-23 18:56:41 +00:00
Fix palette names when palette ID > 58 and not custom
This commit is contained in:
parent
6d1b9ffad2
commit
ecee073e08
@ -265,8 +265,8 @@ uint8_t extractModeName(uint8_t mode, const char *src, char *dest, uint8_t maxLe
|
|||||||
} else return 0;
|
} else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src == JSON_palette_names && mode > GRADIENT_PALETTE_COUNT) {
|
if (src == JSON_palette_names && mode > (GRADIENT_PALETTE_COUNT + 13)) {
|
||||||
snprintf_P(dest, maxLen, PSTR("~ Custom %d~"), 255-mode);
|
snprintf_P(dest, maxLen, PSTR("~ Custom %d ~"), 255-mode);
|
||||||
dest[maxLen-1] = '\0';
|
dest[maxLen-1] = '\0';
|
||||||
return strlen(dest);
|
return strlen(dest);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user