From 63ec7daa6910446f89a324bce55aac7f80cf2643 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sat, 12 Jun 1999 10:46:31 +0000 Subject: [PATCH] X11DRV_DIB_SetImageBits_24/32: Fix the case for bits_per_pixel == 32 and negative lines. --- graphics/x11drv/dib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index 46bf1a4c577..7252269d418 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c @@ -936,7 +936,7 @@ static void X11DRV_DIB_SetImageBits_24( int lines, const BYTE *srcbits, } } else { lines = -lines; - imageBits = (BYTE *)(bmpImage->data + (lines - 1)*bmpImage->bytes_per_line); + imageBits = (BYTE *)(bmpImage->data); for (h = 0; h < lines; h++) { for (x = left; x < dstwidth; x++, bits += 3) { imageBits[(x << 2) + indA] = 0x00; @@ -1094,7 +1094,7 @@ static void X11DRV_DIB_SetImageBits_32( int lines, const BYTE *srcbits, } } else { lines = -lines; - imageBits = (BYTE *)(bmpImage->data + (lines - 1)*bmpImage->bytes_per_line); + imageBits = (BYTE *)(bmpImage->data); for (h = 0; h < lines; h++) { for (x = left; x < dstwidth; x++, bits += 4) { imageBits[(x << 2) + indA] = 0x00; -- 2.11.4.GIT