[libpng17] Imported from libpng-1.7.0beta57.tar

This commit is contained in:
Glenn Randers-Pehrson
2015-03-16 19:32:15 -05:00
parent e4521a073c
commit 341e23c009
14 changed files with 29 additions and 29 deletions

View File

@@ -1348,8 +1348,8 @@ png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type)
{
png_byte maxbits;
maxbits = color_type==PNG_COLOR_TYPE_PALETTE ? 8 :
(png_byte)(png_ptr->usr_bit_depth & 0xff);
maxbits = (png_byte)((color_type==PNG_COLOR_TYPE_PALETTE ? 8 :
png_ptr->usr_bit_depth) & 0xff);
if (sbit->red == 0 || sbit->red > maxbits ||
sbit->green == 0 || sbit->green > maxbits ||