From: Derek Foreman Date: Tue, 20 May 2003 19:07:27 +0000 (+0000) Subject: of by one error in pyramid, rectangle, and crosspipe X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=76425437d463d21c8f7c8ba8198e80cc68e071b3;p=chaz%2Fopenbox of by one error in pyramid, rectangle, and crosspipe --- diff --git a/render/gradient.c b/render/gradient.c index 2cff3870..695d8644 100644 --- a/render/gradient.c +++ b/render/gradient.c @@ -391,7 +391,7 @@ void gradient_solid(Appearance *l, int x, int y, int w, int h) void gradient_pyramid(Surface *sf, int inw, int inh) { pixel32 *data = sf->data.planar.pixel_data; - pixel32 *end = data + inw*inh; + pixel32 *end = data + inw*inh - 1; pixel32 current; float drx, dgx, dbx, dry, dgy, dby; unsigned int r,g,b; @@ -434,7 +434,7 @@ void gradient_pyramid(Surface *sf, int inw, int inh) void gradient_rectangle(Surface *sf, int inw, int inh) { pixel32 *data = sf->data.planar.pixel_data; - pixel32 *end = data + inw*inh; + pixel32 *end = data + inw*inh - 1; pixel32 current; float drx, dgx, dbx, dry, dgy, dby; unsigned int r,g,b; @@ -479,7 +479,7 @@ void gradient_rectangle(Surface *sf, int inw, int inh) void gradient_pipecross(Surface *sf, int inw, int inh) { pixel32 *data = sf->data.planar.pixel_data; - pixel32 *end = data + inw*inh; + pixel32 *end = data + inw*inh - 1; pixel32 current; float drx, dgx, dbx, dry, dgy, dby; unsigned int r,g,b;