Skip to content

Commit 67131e4

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix gdAlphaMax limit typo
2 parents c7c7620 + c0dcd14 commit 67131e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/gd/libgd/gd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2625,7 +2625,7 @@ void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, i
26252625
red = red >= 255.5 ? 255 : red+0.5;
26262626
blue = blue >= 255.5 ? 255 : blue+0.5;
26272627
green = green >= 255.5 ? 255 : green+0.5;
2628-
alpha = alpha >= gdAlphaMax+0.5 ? 255 : alpha+0.5;
2628+
alpha = alpha >= gdAlphaMax+0.5 ? gdAlphaMax : alpha+0.5;
26292629
gdImageSetPixel(dst, x, y, gdTrueColorAlpha ((int)red, (int)green, (int)blue, (int)alpha));
26302630
}
26312631
}

0 commit comments

Comments
 (0)