summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/libgd/gd.c')
-rw-r--r--ext/gd/libgd/gd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index bb12cefc0..3edec2edf 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1885,6 +1885,10 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc)
struct seg *stack;
struct seg *sp;
+ if (!im->trueColor && nc > (im->colorsTotal -1)) {
+ return;
+ }
+
alphablending_bak = im->alphaBlendingFlag;
im->alphaBlendingFlag = 0;