Commit fb02ee91 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed end-of-line bug in X11DRV_DIB_SetImageBits_RLE4.

parent b1752281
......@@ -357,20 +357,20 @@ static void X11DRV_DIB_SetImageBits_RLE4( int lines, const BYTE *bits,
if (length) { /* encoded */
c = *bits++;
while (length--) {
XPutPixel(bmpImage, x++, lines, colors[c >>4]);
if(x >= width) {
x = 0;
if(--lines < 0)
return;
}
XPutPixel(bmpImage, x++, lines, colors[c >>4]);
if (length) {
length--;
XPutPixel(bmpImage, x++, lines, colors[c & 0xf]);
if(x >= width) {
x = 0;
if(--lines < 0)
return;
}
XPutPixel(bmpImage, x++, lines, colors[c & 0xf]);
}
}
} else {
......@@ -396,20 +396,20 @@ static void X11DRV_DIB_SetImageBits_RLE4( int lines, const BYTE *bits,
default: /* absolute */
while (length--) {
c = *bits++;
XPutPixel(bmpImage, x++, lines, colors[c >> 4]);
if(x >= width) {
x = 0;
if(--lines < 0)
return;
}
XPutPixel(bmpImage, x++, lines, colors[c >> 4]);
if (length) {
length--;
XPutPixel(bmpImage, x++, lines, colors[c & 0xf]);
if(x >= width) {
x = 0;
if(--lines < 0)
return;
}
XPutPixel(bmpImage, x++, lines, colors[c & 0xf]);
}
}
if ((bits - begin) & 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment