Commit f0a353ec authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

Fix random segfaults in X11DRV_SetImageBits_1.

parent 69ace8ca
...@@ -1628,6 +1628,7 @@ static void X11DRV_DIB_SetImageBits_1( int lines, const BYTE *srcbits, ...@@ -1628,6 +1628,7 @@ static void X11DRV_DIB_SetImageBits_1( int lines, const BYTE *srcbits,
XPutPixel( bmpImage, x++, h, colors[(srcval >> 1) & 1] ); XPutPixel( bmpImage, x++, h, colors[(srcval >> 1) & 1] );
XPutPixel( bmpImage, x++, h, colors[ srcval & 1] ); XPutPixel( bmpImage, x++, h, colors[ srcval & 1] );
} }
if (dstwidth % 8){
srcval=*srcbyte; srcval=*srcbyte;
switch (dstwidth & 7) switch (dstwidth & 7)
{ {
...@@ -1639,6 +1640,7 @@ static void X11DRV_DIB_SetImageBits_1( int lines, const BYTE *srcbits, ...@@ -1639,6 +1640,7 @@ static void X11DRV_DIB_SetImageBits_1( int lines, const BYTE *srcbits,
case 2: XPutPixel(bmpImage, x++, h, colors[srcval >> 7]); srcval<<=1; case 2: XPutPixel(bmpImage, x++, h, colors[srcval >> 7]); srcval<<=1;
case 1: XPutPixel(bmpImage, x++, h, colors[srcval >> 7]); case 1: XPutPixel(bmpImage, x++, h, colors[srcval >> 7]);
} }
}
srcbits += linebytes; srcbits += linebytes;
} }
} }
......
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