Index: win32ss/user/user32/windows/cursoricon.c =================================================================== --- win32ss/user/user32/windows/cursoricon.c (revision 70769) +++ win32ss/user/user32/windows/cursoricon.c (working copy) @@ -117,11 +117,10 @@ static BOOL is_dib_monochrome( const BITMAPINFO* info ) { - if (info->bmiHeader.biBitCount != 1) return FALSE; - if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) { const RGBTRIPLE *rgb = ((const BITMAPCOREINFO*)info)->bmciColors; + if (((const BITMAPCOREINFO*)info)->bmciHeader.bcBitCount != 1) return FALSE; /* Check if the first color is black */ if ((rgb->rgbtRed == 0) && (rgb->rgbtGreen == 0) && (rgb->rgbtBlue == 0)) @@ -137,6 +136,7 @@ else /* assume BITMAPINFOHEADER */ { const RGBQUAD *rgb = info->bmiColors; + if (info->bmiHeader.biBitCount != 1) return FALSE; /* Check if the first color is black */ if ((rgb->rgbRed == 0) && (rgb->rgbGreen == 0) && @@ -1298,7 +1298,7 @@ if(!hbmpOld) goto end; if(!StretchDIBits(hdc, 0, 0, cxDesired, cyDesired, - 0, 0, pbmi->bmiHeader.biWidth, pbmi->bmiHeader.biHeight, + 0, 0, width, height, pvBits, pbmiCopy, DIB_RGB_COLORS, SRCCOPY)) { ERR("StretchDIBits failed!.\n");