Fix random segfaults in X11DRV_SetImageBits_1.

This commit is contained in:
Vitaliy Margolen 2003-03-31 01:32:47 +00:00 committed by Alexandre Julliard
parent 69ace8ca6c
commit f0a353ec35
1 changed files with 12 additions and 10 deletions

View File

@ -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] );
}
if (dstwidth % 8){
srcval=*srcbyte;
switch (dstwidth & 7)
{
@ -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 1: XPutPixel(bmpImage, x++, h, colors[srcval >> 7]);
}
}
srcbits += linebytes;
}
}