Skip to content

Commit 2baeb16

Browse files
committed
Improve fix for bug #70976
1 parent dcf3c97 commit 2baeb16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/gd/libgd/gd_interpolation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2154,7 +2154,7 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in
21542154
{
21552155
const int angle_rounded = (int)floor(angle * 100);
21562156

2157-
if (bgcolor < 0 || bgcolor >= gdMaxColors) {
2157+
if (bgcolor < 0 || (!src->trueColor && bgcolor >= gdMaxColors)) {
21582158
return NULL;
21592159
}
21602160

0 commit comments

Comments
 (0)