comctl32/imagelist: Use the correct allocation size for the image mask.
Reported by Petru Florin Mihancea. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f57246e5e5
commit
5dd9a1f00e
|
@ -296,7 +296,7 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
|
||||||
mask_info->bmiHeader = info->bmiHeader;
|
mask_info->bmiHeader = info->bmiHeader;
|
||||||
mask_info->bmiHeader.biBitCount = 1;
|
mask_info->bmiHeader.biBitCount = 1;
|
||||||
mask_info->bmiHeader.biSizeImage = mask_width * height;
|
mask_info->bmiHeader.biSizeImage = mask_width * height;
|
||||||
if (!(mask_bits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, info->bmiHeader.biSizeImage )))
|
if (!(mask_bits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, mask_info->bmiHeader.biSizeImage )))
|
||||||
goto done;
|
goto done;
|
||||||
if (!GetDIBits( hdc, hbmMask, 0, height, mask_bits, mask_info, DIB_RGB_COLORS )) goto done;
|
if (!GetDIBits( hdc, hbmMask, 0, height, mask_bits, mask_info, DIB_RGB_COLORS )) goto done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue