summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-12-28 23:44:14 -0800
committerStanislav Malyshev <stas@php.net>2015-12-28 23:44:14 -0800
commit2baeb167a08b0186a885208bdc8b5871f1681dc8 (patch)
tree6f8787a3d93a6f1851af210d9f4198cfc82c0340
parentdcf3c9761c31e12011ba202f30caff53aae2056c (diff)
downloadphp-git-2baeb167a08b0186a885208bdc8b5871f1681dc8.tar.gz
Improve fix for bug #70976
-rw-r--r--ext/gd/libgd/gd_interpolation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index efb584c1e4..eb35efb470 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -2154,7 +2154,7 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in
{
const int angle_rounded = (int)floor(angle * 100);
- if (bgcolor < 0 || bgcolor >= gdMaxColors) {
+ if (bgcolor < 0 || (!src->trueColor && bgcolor >= gdMaxColors)) {
return NULL;
}