Skip to content

Commit

Permalink
Merge pull request #8293 from radarhere/quant
Browse files Browse the repository at this point in the history
Fix undefined variable
  • Loading branch information
hugovk authored Aug 9, 2024
2 parents 082e323 + 70298d3 commit c8b5f0b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/libImaging/Quant.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ test_sorted(PixelList *pl[3]) {
for (i = 0; i < 3; i++) {
l = 256;
for (t = pl[i]; t; t = t->next[i]) {
if (l < t->p.a.v[i])
if (l < t->p.a.v[i]) {
return 0;
}
l = t->p.a.v[i];
}
}
Expand Down Expand Up @@ -1009,7 +1010,8 @@ compute_palette_from_median_cut(
uint32_t nPixels,
HashTable *medianBoxHash,
Pixel **palette,
uint32_t nPaletteEntries
uint32_t nPaletteEntries,
BoxNode *root
) {
uint32_t i;
uint32_t paletteEntry;
Expand Down Expand Up @@ -1382,7 +1384,9 @@ quantize(
fflush(stdout);
timer = clock();
#endif
if (!compute_palette_from_median_cut(pixelData, nPixels, h, &p, nPaletteEntries)) {
if (!compute_palette_from_median_cut(
pixelData, nPixels, h, &p, nPaletteEntries, root
)) {
goto error_3;
}
#ifdef DEBUG
Expand Down

0 comments on commit c8b5f0b

Please sign in to comment.