summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gd.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/gd.c b/src/gd.c
index ec6e08a..cd16d34 100644
--- a/src/gd.c
+++ b/src/gd.c
@@ -1991,21 +1991,15 @@ BGD_DECLARE(void) gdImageFill(gdImagePtr im, int x, int y, int nc)
if (im->sx < 4) {
int ix = x, iy = y, c;
do {
- c = gdImageGetPixel(im, ix, iy);
- if (c != oc) {
- goto done;
- }
- gdImageSetPixel(im, ix, iy, nc);
- } while(ix++ < (im->sx -1));
- ix = x;
- iy = y + 1;
- do {
- c = gdImageGetPixel(im, ix, iy);
- if (c != oc) {
- goto done;
- }
- gdImageSetPixel(im, ix, iy, nc);
- } while(ix++ < (im->sx -1));
+ do {
+ c = gdImageGetPixel(im, ix, iy);
+ if (c != oc) {
+ goto done;
+ }
+ gdImageSetPixel(im, ix, iy, nc);
+ } while(ix++ < (im->sx -1));
+ ix = x;
+ } while(iy++ < (im->sy -1));
goto done;
}