Skip to content

Commit

Permalink
Initialize unsigned char variables
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 22, 2022
1 parent fff0760 commit 318b658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libImaging/Quant.c
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,7 @@ ImagingQuantize(Imaging im, int colors, int mode, int kmeans) {

withAlpha = !strcmp(im->mode, "RGBA");
int transparency = 0;
unsigned char r, g, b;
unsigned char r = 0, g = 0, b = 0;
for (i = y = 0; y < im->ysize; y++) {
for (x = 0; x < im->xsize; x++, i++) {
p[i].v = im->image32[y][x];
Expand Down

0 comments on commit 318b658

Please sign in to comment.