From e24e904efb937cfc8f2edf24df80040cc0467d52 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 14 Apr 2007 17:30:51 +0000 Subject: [PATCH] - libgd #74, gdImageFilledArc, huge CPU usage with large angles --- ext/gd/libgd/gd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 6cf29ba1df..ea4cdf7614 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1643,6 +1643,14 @@ void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e int lx = 0, ly = 0; int fx = 0, fy = 0; + if (s > 360) { + s = s % 360; + } + + if (e > 360) { + e = e % 360; + } + while (s<0) { s += 360; } -- 2.50.1