Commit 183eae90 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Multiple *ptr++ constructs in one expression have undefined behaviour,

moved them out of the expression.
parent dae8de69
......@@ -559,10 +559,11 @@ INT WINAPI GetDIBits(
LPBYTE srcbits = sbits;
for( y = 0; y < lines; y++) {
for( x = 0; x < srcwidth; x++ )
*dstbits++ = ((*srcbits++ >> 3) & bmask) |
(((WORD)*srcbits++ << 2) & gmask) |
(((WORD)*srcbits++ << 7) & rmask);
for( x = 0; x < srcwidth; x++, srcbits += 3)
*dstbits++ = ((srcbits[0] >> 3) & bmask) |
(((WORD)srcbits[1] << 2) & gmask) |
(((WORD)srcbits[2] << 7) & rmask);
dstbits = (LPWORD)(dbits+=dstwidthb);
srcbits = (sbits += srcwidthb);
}
......
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