gdi32: Avoid a possible unnecessary conversion if PutImage is called with zero biClrUsed.

This commit is contained in:
Huw Davies 2011-08-19 16:26:11 +01:00 committed by Alexandre Julliard
parent 40742c2f72
commit bdc3b9c0a9
1 changed files with 1 additions and 1 deletions

View File

@ -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) );
}