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

Visual Studio (Sergey Kosarevsky)
This commit is contained in:
Sergey Kosarevsky
2015-02-27 19:22:27 -06:00
committed by Glenn Randers-Pehrson
parent 2bf96d75ec
commit 98043c79a2
4 changed files with 27 additions and 13 deletions

View File

@@ -3820,7 +3820,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 */
@@ -3851,7 +3851,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);
}
}