[devel] Revert png_get_current_row_number() to previous (1.5.2beta01) behavior.

This commit is contained in:
John Bowler
2011-02-16 06:13:46 -06:00
committed by Glenn Randers-Pehrson
parent 8ea598b1d1
commit 9616ad9828
3 changed files with 30 additions and 20 deletions

View File

@@ -3073,11 +3073,14 @@ progressive_row(png_structp pp, png_bytep new_row, png_uint_32 y, int pass)
*/
if (dp->do_interlace && dp->interlace_type == PNG_INTERLACE_ADAM7)
{
if (pass != png_get_current_pass_number(pp))
png_error(pp, "png_get_current_pass_number is broken");
y = PNG_ROW_FROM_PASS_ROW(y, pass);
/* Use this opportunity to validate the png 'current' APIs: */
if (y != png_get_current_row_number(pp))
png_error(pp, "png_get_current_row_number is broken");
if (pass != png_get_current_pass_number(pp))
png_error(pp, "png_get_current_pass_number is broken");
y = PNG_ROW_FROM_PASS_ROW(y, pass);
}
/* Validate this just in case. */