Bug #68714 [Ana->Csd]: copy 'n paste error
| From: | cmb@php.net | Date: | Sun, 12 Jul 2015 14:44:35 +0000 |
| Subject: | Bug #68714 [Ana->Csd]: copy 'n paste error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-194352@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68714&edit=1
ID: 68714
Updated by: cmb@php.net
Reported by: bugreports at internot dot info
Summary: copy 'n paste error
-Status: Analyzed
+Status: Closed
Type: Bug
Package: GD related
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-02 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ba7c3a1bb40c4c087436a230dd7372ff9b6413d8
Log: Fix #68714: copy 'n paste error
Previous Comments:
------------------------------------------------------------------------
[2015-07-12 13:35:16] cmb@php.net
> I'm guessing the first one should be "if(old_y1!=my1)" ?
Indeed, that would be cleaner. However, it doesn't change the
behavior of the algorithm[1]. Actually, only one of old_y1 and
old_y2 is needed, because old_y1!=my1 is equivalent to
old_y2!=my2. This simplification is already done in the external
libgd[2], however, one could go a step further and merge both for
loops.
[1] <https://github.com/php/php-src/blob/php-5.6.11/ext/gd/libgd/gd_arc.c#L81-L107>
[2] <https://github.com/libgd/libgd/blob/gd-2.1.1/src/gd.c#L1897-L1923>
------------------------------------------------------------------------
[2015-01-02 07:47:50] bugreports at internot dot info
Description:
------------
Hi,
In /ext/gd/libgd/gd_arc.c:
95 if(old_y2!=my2){
96 for(i=mx1;i<=mx2;i++){
97 gdImageSetPixel(im,i,my1,c);
98 }
99 }
original: old_y2 != my2 looks like the original copy.
100 if(old_y2!=my2){
101 for(i=mx1;i<=mx2;i++){
102 gdImageSetPixel(im,i,my2,c);
103 }
104 }
I'm guessing the first one should be "if(old_y1!=my1)" ?
Thanks,
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68714&edit=1