From 86f0a3bedc31d3a72783435ef79428c036685cb3 Mon Sep 17 00:00:00 2001 From: Sani7 Date: Fri, 8 Dec 2023 12:30:15 +0100 Subject: [PATCH] tcp_cmd fix bug of tcp_cmd_bg_color writing to color_txt when in argb mode --- project/Core/Src/tcp_cmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/project/Core/Src/tcp_cmd.c b/project/Core/Src/tcp_cmd.c index 3ed2e84..c17f764 100644 --- a/project/Core/Src/tcp_cmd.c +++ b/project/Core/Src/tcp_cmd.c @@ -146,11 +146,11 @@ static void tcp_cmd_bg_color(struct tcp_pcb* pcb, int argc, char** argv) { } if (argc == 4) { LOG_INFO(TAG, "Setting background color to %s %s %s %s", argv[0], argv[1], argv[2], argv[3]); - color_txt = 0xff000000; - color_txt ^= (uint32_t)strtoul(argv[0], NULL, 10) << 24; - color_txt |= (uint32_t)strtoul(argv[1], NULL, 10) << 16; - color_txt |= (uint32_t)strtoul(argv[2], NULL, 10) << 8; - color_txt |= (uint32_t)strtoul(argv[3], NULL, 10); + color_bg = 0xff000000; + color_bg ^= (uint32_t)strtoul(argv[0], NULL, 10) << 24; + color_bg |= (uint32_t)strtoul(argv[1], NULL, 10) << 16; + color_bg |= (uint32_t)strtoul(argv[2], NULL, 10) << 8; + color_bg |= (uint32_t)strtoul(argv[3], NULL, 10); return; } LOG_WARN(TAG, "Bad usage of bgcolor");