Skip to content

Commit 40329bf

Browse files
author
Ilia Alshanetsky
committed
MFH: Fixed bug #28311 (Transparency detection code is off by 1).
1 parent b9d3aaf commit 40329bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/gd/libgd/gd_topal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ pass2_no_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output
12601260
* will later be added at the end of the palette as the transparent
12611261
* index.
12621262
*/
1263-
if ((im->transparent >= 0) && (im->transparent == *inptr)) {
1263+
if ((im->transparent >= 0) && (im->transparent == *(inptr - 1))) {
12641264
*outptr++ = im->colorsTotal;
12651265
continue;
12661266
}

0 commit comments

Comments
 (0)