From a3eba64d464d36cb5fac25d3f1f1ff1044b00579 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sat, 6 Jan 2024 02:31:15 -0500 Subject: [PATCH] ewmhicon: Fix colourmap generation in w32vga mode. The bitmap tracking which colours are used is not properly initialized to zero, so the generated XPM potentially includes a bunch of garbage in the colourmap section. No idea why this went unnoticed before as it is completely not working today. --- t/ewmhicon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/ewmhicon.c b/t/ewmhicon.c index 5919363..ffd1d98 100644 --- a/t/ewmhicon.c +++ b/t/ewmhicon.c @@ -1,6 +1,6 @@ /* * Test app for _NET_WM_ICON formatting. - * Copyright © 2022-2023 Nick Bowler + * Copyright © 2022-2024 Nick Bowler * * Use a fake colour scheme to generate an icon of the chosen size (16x16, * 24x24, 32x32 or 48x48) and display the pixels as characters. @@ -142,7 +142,7 @@ static void print_xpm_w32vga(unsigned long size, unsigned long *icon_buf) }; unsigned long prev_colour = 0; - unsigned used_colours, v; + unsigned used_colours = 0, v; size = (unsigned long) w * h; for (i = 0; i < size; i++) { -- 2.43.2