gdi32: Avoid a possible unnecessary conversion if PutImage is called with zero biClrUsed.
This commit is contained in:
parent
40742c2f72
commit
bdc3b9c0a9
|
@ -444,7 +444,7 @@ static BOOL matching_color_info( const dib_info *dib, const BITMAPINFO *info )
|
|||
case 8:
|
||||
{
|
||||
RGBQUAD *color_table = (RGBQUAD *)((char *)info + info->bmiHeader.biSize);
|
||||
if (dib->color_table_size != info->bmiHeader.biClrUsed ) return FALSE;
|
||||
if (dib->color_table_size != get_dib_num_of_colors( info )) return FALSE;
|
||||
return !memcmp( color_table, dib->color_table, dib->color_table_size * sizeof(RGBQUAD) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue