Commit 63ec7daa authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

X11DRV_DIB_SetImageBits_24/32: Fix the case for bits_per_pixel == 32

and negative lines.
parent 9e61c1cc
...@@ -936,7 +936,7 @@ static void X11DRV_DIB_SetImageBits_24( int lines, const BYTE *srcbits, ...@@ -936,7 +936,7 @@ static void X11DRV_DIB_SetImageBits_24( int lines, const BYTE *srcbits,
} }
} else { } else {
lines = -lines; lines = -lines;
imageBits = (BYTE *)(bmpImage->data + (lines - 1)*bmpImage->bytes_per_line); imageBits = (BYTE *)(bmpImage->data);
for (h = 0; h < lines; h++) { for (h = 0; h < lines; h++) {
for (x = left; x < dstwidth; x++, bits += 3) { for (x = left; x < dstwidth; x++, bits += 3) {
imageBits[(x << 2) + indA] = 0x00; imageBits[(x << 2) + indA] = 0x00;
...@@ -1094,7 +1094,7 @@ static void X11DRV_DIB_SetImageBits_32( int lines, const BYTE *srcbits, ...@@ -1094,7 +1094,7 @@ static void X11DRV_DIB_SetImageBits_32( int lines, const BYTE *srcbits,
} }
} else { } else {
lines = -lines; lines = -lines;
imageBits = (BYTE *)(bmpImage->data + (lines - 1)*bmpImage->bytes_per_line); imageBits = (BYTE *)(bmpImage->data);
for (h = 0; h < lines; h++) { for (h = 0; h < lines; h++) {
for (x = left; x < dstwidth; x++, bits += 4) { for (x = left; x < dstwidth; x++, bits += 4) {
imageBits[(x << 2) + indA] = 0x00; imageBits[(x << 2) + indA] = 0x00;
......
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