Fixed bug when scrolling with negative X, e.g. g.scroll(-1,0)

This commit is contained in:
Richard Blakesley 2021-10-14 09:52:13 +01:00 committed by Gordon Williams
parent ea7c44c39e
commit 60b3c400d9

View File

@ -82,7 +82,7 @@ void graphicsFallbackScrollX(JsGraphics *gfx, int xdir, int yfrom, int yto, int
int x;
if (xdir<=0) {
int w = x2+xdir;
for (x=x1;x<w;x++)
for (x=x1;x<=w;x++)
gfx->setPixel(gfx, (int)x,(int)yto,
gfx->getPixel(gfx, (int)(x-xdir),(int)yfrom));
} else { // >0