summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2004-05-24 19:52:28 +0000
committerPierre Joye <pajoye@php.net>2004-05-24 19:52:28 +0000
commit5b71225f1b20519d83b4f41260d1a81dd45fe4fe (patch)
tree0483250d1b69f927a0be2e07b8134eaa43658786 /ext/gd
parent396bf393110d54009e7aad6a5b7605be6c1bec8d (diff)
downloadphp-git-5b71225f1b20519d83b4f41260d1a81dd45fe4fe.tar.gz
- Fix #28506, negative angle returns "random arcs"
while (angle < 0) angle += 2*M_PI is used now
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/libgd/gd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index c3f3be822d..c127928cba 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1605,9 +1605,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;
+ while (s<0) {
+ s += 360;
+ }
+
while (e < s) {
e += 360;
}
+
for (i = s; i <= e; i++) {
int x, y;
x = ((long) gdCosT[i % 360] * (long) w / (2 * 1024)) + cx;