Re: [GD-DEVEL] bug and fix

[email protected] (Pierre)
Newsgroups php.gd.devel
Message-ID <[email protected]>
Hi Ducky,

On 7/19/07, Ducky Sherwood <[email protected]> wrote:
> Hi --
>
> I found a bug in gdImageFilledPolygon.
>
> In some cases, you can get an odd number of x-intercepts, which means that
> in the call to gdImageLine
>   gdImageLine (im, im->polyInts[i], y, im->polyInts[i + 1], y, fill_color);
> the im->polyInts[i+1] will be garbage.  This can mess up the drawing of the
> line.
>
> I have attached a test case (bug.c) which shows a horizontal line being
> drawn where it shouldn't.
>
> I have also attached a patch, made with
>    diff -Naur gd.c gd.c.good > horizontalLineBug.patch
>
> (I would have reported the bug and patch on flypaper, but I never saw a
> reply (and yes, I told it my correct email address, and no, I couldn't find
> it in my spam folder).)

Thanks for the patch, I will check it over the weekend. I also created
your account manually (see my prv mail), if you like to add it in
bugs.libgd.org.

Cheers,
--Pierre
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.