tcp_cmd
fix bug of tcp_cmd_bg_color writing to color_txt when in argb mode
This commit is contained in:
@@ -146,11 +146,11 @@ static void tcp_cmd_bg_color(struct tcp_pcb* pcb, int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
if (argc == 4) {
|
if (argc == 4) {
|
||||||
LOG_INFO(TAG, "Setting background color to %s %s %s %s", argv[0], argv[1], argv[2], argv[3]);
|
LOG_INFO(TAG, "Setting background color to %s %s %s %s", argv[0], argv[1], argv[2], argv[3]);
|
||||||
color_txt = 0xff000000;
|
color_bg = 0xff000000;
|
||||||
color_txt ^= (uint32_t)strtoul(argv[0], NULL, 10) << 24;
|
color_bg ^= (uint32_t)strtoul(argv[0], NULL, 10) << 24;
|
||||||
color_txt |= (uint32_t)strtoul(argv[1], NULL, 10) << 16;
|
color_bg |= (uint32_t)strtoul(argv[1], NULL, 10) << 16;
|
||||||
color_txt |= (uint32_t)strtoul(argv[2], NULL, 10) << 8;
|
color_bg |= (uint32_t)strtoul(argv[2], NULL, 10) << 8;
|
||||||
color_txt |= (uint32_t)strtoul(argv[3], NULL, 10);
|
color_bg |= (uint32_t)strtoul(argv[3], NULL, 10);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOG_WARN(TAG, "Bad usage of bgcolor");
|
LOG_WARN(TAG, "Bad usage of bgcolor");
|
||||||
|
|||||||
Reference in New Issue
Block a user