From: Nick Bowler Date: Sat, 6 Jan 2024 07:31:15 +0000 (-0500) Subject: ewmhicon: Fix colourmap generation in w32vga mode. X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/commitdiff_plain/a3eba64d464d36cb5fac25d3f1f1ff1044b00579 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. --- 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++) {