Correct the options handling

Setting the new, higher, option bits triggered the byte check (which is no
longer necessary).

Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
John Bowler 2015-12-28 16:14:15 -08:00
parent 8d124a250a
commit 07c60a383a

2
png.c
View File

@ -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;
}