From 9d8b41ea6f39ca6b1582c09a2b61113d2171e786 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sun, 19 Jul 2009 14:45:43 -0500 Subject: [PATCH] [devel] Relocated new 'if' test after the 'png_debug(1, "in png_write_find_filter");' statement. --- pngwutil.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pngwutil.c b/pngwutil.c index 3e16ce8d5..67ca888aa 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -2128,9 +2128,13 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) png_uint_32 mins, bpp; png_byte filter_to_do = png_ptr->do_filter; png_uint_32 row_bytes = row_info->rowbytes; -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED int num_p_filters = (int)png_ptr->num_prev_filters; -#else +#endif + + png_debug(1, "in png_write_find_filter"); + +#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if ((png_ptr->row_number == 0) && (filter_to_do & PNG_FILTER_NONE) && (filter_to_do & PNG_FILTER_SUB))