From fb02ee91b514600a5fea2c17d36b4b70c6cb4425 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 20 Feb 1999 16:10:38 +0000 Subject: [PATCH] Fixed end-of-line bug in X11DRV_DIB_SetImageBits_RLE4. --- graphics/x11drv/dib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index 68471d239a6..bcd715b1aa6 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c @@ -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) -- 2.11.4.GIT