From 07c60a383a283d74a4e844ec86888c226131bc9a Mon Sep 17 00:00:00 2001 From: John Bowler Date: Mon, 28 Dec 2015 16:14:15 -0800 Subject: [PATCH] Correct the options handling Setting the new, higher, option bits triggered the byte check (which is no longer necessary). Signed-off-by: John Bowler --- png.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/png.c b/png.c index 9ff58691d..76b918f18 100644 --- a/png.c +++ b/png.c @@ -3367,7 +3367,7 @@ png_set_option(png_structrp png_ptr, int option, int onoff) unsigned int setting = (2U + (onoff != 0)) << option; unsigned int current = png_ptr->options; - png_ptr->options = png_check_byte(png_ptr, (current & ~mask) | setting); + png_ptr->options = (current & ~mask) | setting; return (current & mask) >> option; }