cvs: gd(GD_2_0) /libgd gd.c

From: Date: Thu, 14 Jun 2007 19:22:57 +0000
Subject: cvs: gd(GD_2_0) /libgd gd.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-220@lists.php.net to get a copy of this message
pajoye Thu Jun 14 19:22:57 2007 UTC Modified files: (Branch: GD_2_0) /gd/libgd gd.c Log: - #74, Fix regression introduced by the original fix http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.49.2.11&r2=1.49.2.12&diff_format=u Index: gd/libgd/gd.c diff -u gd/libgd/gd.c:1.49.2.11 gd/libgd/gd.c:1.49.2.12 --- gd/libgd/gd.c:1.49.2.11 Sat Jun 9 12:30:11 2007 +++ gd/libgd/gd.c Thu Jun 14 19:22:57 2007 @@ -1,4 +1,4 @@ -/* $Id: gd.c,v 1.49.2.11 2007/06/09 12:30:11 pajoye Exp $ */ +/* $Id: gd.c,v 1.49.2.12 2007/06/14 19:22:57 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -1609,18 +1609,31 @@ int lx = 0, ly = 0; int fx = 0, fy = 0; - if (s > 360) { - s = s % 360; - } + if ((s % 360) == (e % 360)) { + s = 0; e = 360; + } else { + if (s > 360) { + s = s % 360; + } + + if (e > 360) { + e = e % 360; + } + + while (s < 0) { + s += 360; + } + + while (e < s) { + e += 360; + } + + if (s == e) { + s = 0; e = 360; + } + } - if (e > 360) { - e = e % 360; - } - while (e < s) - { - e += 360; - } for (i = s; (i <= e); i++) {

« previous php.gd.cvs (#220) next »