From ecee073e080e36b281836533b3997e5bacd37244 Mon Sep 17 00:00:00 2001 From: thatdonfc Date: Tue, 19 Mar 2024 14:04:24 -0700 Subject: [PATCH] Fix palette names when palette ID > 58 and not custom --- wled00/util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/util.cpp b/wled00/util.cpp index fa6c8faff..1bd8ec319 100644 --- a/wled00/util.cpp +++ b/wled00/util.cpp @@ -265,8 +265,8 @@ uint8_t extractModeName(uint8_t mode, const char *src, char *dest, uint8_t maxLe } else return 0; } - if (src == JSON_palette_names && mode > GRADIENT_PALETTE_COUNT) { - snprintf_P(dest, maxLen, PSTR("~ Custom %d~"), 255-mode); + if (src == JSON_palette_names && mode > (GRADIENT_PALETTE_COUNT + 13)) { + snprintf_P(dest, maxLen, PSTR("~ Custom %d ~"), 255-mode); dest[maxLen-1] = '\0'; return strlen(dest); }