mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Imported from libpng-1.6.24beta02.tar
This commit is contained in:
@@ -2448,7 +2448,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
/* Overflow can occur in the calculation, just select the lowest set
|
||||
* filter.
|
||||
*/
|
||||
filter_to_do &= 0U-filter_to_do;
|
||||
filter_to_do &= -filter_to_do;
|
||||
}
|
||||
else if ((filter_to_do & PNG_FILTER_NONE) != 0 &&
|
||||
filter_to_do != PNG_FILTER_NONE)
|
||||
@@ -2477,7 +2477,9 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
/* It's the only filter so no testing is needed */
|
||||
{
|
||||
/* Passing PNG_SIZE_MAX here and below prevents the 'setup' function
|
||||
* breaking out of the loop when lmins is exceeded.
|
||||
* breaking out of the loop when lmins is exceeded. Optimizing
|
||||
* compilers should notice that we don't use the returned sum, and
|
||||
* therefore 'setup' should refrain from calculating and returning "sum".
|
||||
*/
|
||||
(void) png_setup_sub_row(png_ptr, bpp, row_bytes, PNG_SIZE_MAX);
|
||||
best_row = png_ptr->try_row;
|
||||
|
||||
Reference in New Issue
Block a user