Commit c011267b authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

Fixed retrieval of invalid palette data in GetDIBits().

parent 04e57f97
......@@ -461,12 +461,13 @@ INT32 WINAPI GetDIBits32(
return 0;
}
/* Transfer color info */
/* Transfer color info (FIXME) */
if (info->bmiHeader.biBitCount<=8) {
int colors = info->bmiHeader.biClrUsed;
if (!colors && (info->bmiHeader.biBitCount <= 8))
colors = 1 << info->bmiHeader.biBitCount;
if (info && (info->bmiHeader.biBitCount <= 8) &&
(bmp->bitmap.bmBitsPixel <= 8))
{
int colors = 1 << info->bmiHeader.biBitCount;
info->bmiHeader.biClrUsed = 0;
palEntry = palette->logpalette.palPalEntry;
for (i = 0; i < colors; i++, palEntry++)
{
......
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