ZSANITIZEM: The 2 maybe issues due to -fsanitize=memory were

also false positives so surround with ZSANITIZEM conditional
gif.c: some code fiddling (remove unnecessary braces)
output.c: out_colour_char_to_rgb: take unsigned char
general: some casts
This commit is contained in:
gitlost 2025-02-19 17:51:23 +00:00
parent c7cf006e71
commit 888b4b5684
7 changed files with 65 additions and 58 deletions

View file

@ -69,12 +69,12 @@ INTERNAL int bmp_pixel_plot(struct zint_symbol *symbol, const unsigned char *pix
if (memcmp(&palette[i], &fg, sizeof(fg)) == 0) {
ultra_fg_index = i + 1;
}
map[ultra_chars[i]] = i + 1;
map[ultra_chars[i]] = (unsigned char) (i + 1);
}
bits_per_pixel = 4;
colour_count = ultra_fg_index == 9 ? 10 : 9;
map['0'] = 0;
map['1'] = ultra_fg_index;
map['1'] = (unsigned char) ultra_fg_index;
} else {
bits_per_pixel = 1;
colour_count = 2;