mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
comctl32: Avoid losing the color masks in CreateMappedBitmap.
This commit is contained in:
parent
d4aacad9ea
commit
d8241b8db6
1 changed files with 4 additions and 1 deletions
|
@ -796,7 +796,10 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
|
|||
nColorTableSize = (1 << lpBitmap->biBitCount);
|
||||
else
|
||||
nColorTableSize = 0;
|
||||
nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
|
||||
nSize = lpBitmap->biSize;
|
||||
if (nSize == sizeof(BITMAPINFOHEADER) && lpBitmap->biCompression == BI_BITFIELDS)
|
||||
nSize += 3 * sizeof(DWORD);
|
||||
nSize += nColorTableSize * sizeof(RGBQUAD);
|
||||
lpBitmapInfo = GlobalAlloc (GMEM_FIXED, nSize);
|
||||
if (lpBitmapInfo == NULL)
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue