[libpng16] Avoid runtime checks when converting integer to png_byte with

Visual Studio (Sergey Kosarevsky)
This commit is contained in:
Sergey Kosarevsky
2015-02-27 18:47:43 -06:00
committed by Glenn Randers-Pehrson
parent 494e75ac83
commit 9a3de48b48
4 changed files with 15 additions and 7 deletions

View File

@@ -3850,7 +3850,7 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
while (row < rp_end)
{
int a = *row + *prev_row++;
*row++ = (png_byte)a;
*row++ = (png_byte)(a&0xFF);
}
/* Remainder */
@@ -3881,7 +3881,7 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
if (pc < pa) a = c;
a += *row;
*row++ = (png_byte)a;
*row++ = (png_byte)(a&0xFF);
}
}