diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 0b0ccab9509..fa37e37b4df 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1739,6 +1739,7 @@ gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int s /* Destination is palette based */ if (src->trueColor) { /* But source is truecolor (Ouch!) */ + toy = dstY; for (y = srcY; (y < (srcY + h)); y++) { tox = dstX;