Fix bug where the rightmost few pixels of a cursor could sometimes be corrupted

This commit is contained in:
Stephen Heumann 2015-09-25 23:47:09 -05:00
parent 8cdef04732
commit 8ee57096d2

View File

@ -272,10 +272,8 @@ void DoCursor (void) {
if (rectWidth % 4) {
*(imageLine + n) = 0;
switch (rectWidth - n * 4) {
case 3: *(imageLine + n) += coltab640[*(dataPtr++)] & 0x0C;
case 2: *(imageLine + n) += coltab640[*(dataPtr++)] & 0x30;
case 1: *(imageLine + n) += coltab640[*(dataPtr++)] & 0xC0;
for (j = 0; j < rectWidth % 4; j++) {
*(imageLine + n) += coltab640[*(dataPtr++)] & (0xC0 >> j*2);
}
*(imageLine + n) ^= 0xFF; /* Reverse color */
*(imageLine + n) &= *(maskLine + n);