From 98aacb16c3720214e55e0c2f420f69b9d49b1a1f Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 8 Apr 2011 20:41:48 -0500 Subject: [PATCH] [master] Relocated new misplaced declarations in pngwutil.c --- pngwutil.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pngwutil.c b/pngwutil.c index b73c6a9d9..f97c3d157 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -682,6 +682,9 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) if (length >= 2 && png_ptr->height < 16384 && png_ptr->width < 16384) { + unsigned int z_cinfo; + unsigned int half_z_window_size; + /* Compute the maximum possible length of the datastream */ /* Number of pixels, plus for each row a filter byte and possible @@ -700,8 +703,8 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) uncompressed_idat_size += ((png_ptr->height + 7)/8) * (png_ptr->bit_depth < 8 ? 12 : 6); - unsigned int z_cinfo = z_cmf >> 4; - unsigned int half_z_window_size = 1 << (z_cinfo + 7); + z_cinfo = z_cmf >> 4; + half_z_window_size = 1 << (z_cinfo + 7); while (uncompressed_idat_size <= half_z_window_size && half_z_window_size >= 256) {