Index: subsystems/win32/win32k/objects/bitmaps.c =================================================================== --- subsystems/win32/win32k/objects/bitmaps.c (revision 50894) +++ subsystems/win32/win32k/objects/bitmaps.c (working copy) @@ -920,7 +920,8 @@ pds->dsBmih.biHeight = pds->dsBm.bmHeight; pds->dsBmih.biPlanes = pds->dsBm.bmPlanes; pds->dsBmih.biBitCount = pds->dsBm.bmBitsPixel; - if(psurf->ppal->flFlags & PAL_BITFIELDS) + /* BI_BITFIELDS is only valid for 32 and 16 bits bitmaps, but PAL_BITFIELDS is used in 24 bits bitmaps too */ + if((psurf->ppal->flFlags & PAL_BITFIELDS) && (psurf->SurfObj.iBitmapFormat == BMF_32BPP || psurf->SurfObj.iBitmapFormat == BMF_16BPP)) { pds->dsBmih.biCompression = BI_BITFIELDS; } @@ -948,6 +949,8 @@ case BMF_PNG: pds->dsBmih.biCompression = BI_PNG; break; + default: + assert(FALSE); /* this shouldn't happen */ } } pds->dsBmih.biSizeImage = psurf->SurfObj.cjBits;