cvs: php-src /ext/gd/libgd gd.c
| From: | Pierre-Alain Joye | Date: | Mon, 24 May 2004 19:52:28 +0000 |
| Subject: | cvs: php-src /ext/gd/libgd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-27431@lists.php.net to get a copy of this message | ||
pajoye Mon May 24 15:52:28 2004 EDT
Modified files:
/php-src/ext/gd/libgd gd.c
Log:
- Fix #28506, negative angle returns "random arcs"
while (angle < 0) angle += 2*M_PI is used now
http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd.c?r1=1.80&r2=1.81&ty=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.80 php-src/ext/gd/libgd/gd.c:1.81
--- php-src/ext/gd/libgd/gd.c:1.80 Sun May 9 14:25:33 2004
+++ php-src/ext/gd/libgd/gd.c Mon May 24 15:52:28 2004
@@ -1605,9 +1605,14 @@
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;