Fix minor regression in 4 bit code

This commit is contained in:
Gordon Williams 2022-11-02 14:50:36 +00:00
parent 26de1ec0ae
commit a6224209b4

View File

@ -158,7 +158,7 @@ void lcdMemLCD_fillRect(struct JsGraphics *gfx, int x1, int y1, int x2, int y2,
lcdBuffer[addr] = (lcdBuffer[addr] & 0xF0) | (ditheredCol&0x0F);
addr++;x++;
}
for (;x<=x2;x+=2) // middle in blocks of 2, aligned so just a copy
for (;x<x2;x+=2) // middle in blocks of 2, aligned so just a copy
lcdBuffer[addr++] = ditheredCol;
if (!(x2&1)) // final pixel on an even coordinate, unaligned
lcdBuffer[addr] = (lcdBuffer[addr] & 0x0F) | (ditheredCol&0xF0);