]> granicus.if.org Git - php/commitdiff
- MFB: Fixed regression introduced by the fix for the libgd bug #74
authorPierre Joye <pajoye@php.net>
Thu, 14 Jun 2007 19:18:00 +0000 (19:18 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 14 Jun 2007 19:18:00 +0000 (19:18 +0000)
ext/gd/libgd/gd.c

index 00b5c99a7348c1fba3e8f2772410e8d107959d3c..30e0d78e2d371890646ec3fba94b32f79d31dbf7 100644 (file)
@@ -1665,20 +1665,29 @@ 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;
-       }
+       if (s == e) {
+               s = 0; e = 360; 
+       } else {
 
-       while (s<0) {
-               s += 360;
-       }
+               if (s > 360) {
+                       s = s % 360;
+               }
 
-       while (e < s) {
-               e += 360;
+               if (e > 360) {
+                       e = e % 360;
+               }
+
+               while (s < 0) {
+                       s += 360;
+               }
+
+               while (e < s) {
+                       e += 360;
+               }
+               if (s == e) {
+                       s = 0; e = 360; 
+               }
        }
 
        for (i = s; i <= e; i++) {