From e3081fb6e95c1cdd8a65b88cc88f7744a124ff98 Mon Sep 17 00:00:00 2001 From: rdbo Date: Mon, 1 Apr 2024 19:13:34 -0300 Subject: [PATCH] fixed malfunctioning theme at random --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 6b68756..c9f79c8 100644 --- a/main.c +++ b/main.c @@ -797,7 +797,7 @@ set_kbd_colors(uint8_t *bgra, char *hex) // bg, fg, text, high, swipe int length = strlen(hex); if (length == 6 || length == 8) { - char subhex[2]; + char subhex[3] = { 0 }; memcpy(subhex, hex, 2); bgra[2] = (int)strtol(subhex, NULL, 16); memcpy(subhex, hex + 2, 2);