From af9654368889736b82343c04516a2deddb35da0e Mon Sep 17 00:00:00 2001 From: John Bowler Date: Sat, 18 Jun 2011 13:25:46 -0500 Subject: [PATCH] [devel] Removed double increment of pointers in the accurate scaling. --- pngrtran.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pngrtran.c b/pngrtran.c index 79a7cd6b3..e9374817e 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1808,9 +1808,9 @@ png_do_chop(png_row_infop row_info, png_bytep row) * later you will need to use the new png_set_scale_16_to_8() * API to obtain accurate 16-to-8 scaling. */ - png_int_32 tmp = *sp++; /* must be signed! */ - tmp += (((int)*sp++ - tmp + 128) * 65535) >> 24; - *dp++ = (png_byte)tmp; + png_int_32 tmp = *sp; /* must be signed! */ + tmp += (((int)sp[1] - tmp + 128) * 65535) >> 24; + *dp = (png_byte)tmp; #else /* Simply discard the low order byte */ *dp = *sp;