mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] 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
494e75ac83
commit
9a3de48b48
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user