mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Avoid runtime checks when converting integer to png_byte with
Visual Studio (Sergey Kosarevsky)
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
2bf96d75ec
commit
98043c79a2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user