From 140f3aa2801669a23a454edef0fbf88a91f65bc3 Mon Sep 17 00:00:00 2001 From: taigacon Date: Mon, 5 Mar 2018 22:10:41 +0800 Subject: [PATCH] Fix png_set_option to work. --- png.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/png.c b/png.c index 88cf9e743..cc6029ecc 100644 --- a/png.c +++ b/png.c @@ -4344,7 +4344,7 @@ png_set_option(png_structrp png_ptr, int option, int onoff) png_uint_32 setting = (2U + (onoff != 0)) << option; png_uint_32 current = png_ptr->options; - png_ptr->options = (png_uint_32)(((current & ~mask) | setting) & 0xff); + png_ptr->options = (png_uint_32)((current & ~mask) | setting); return (int)(current & mask) >> option; }