Fix png_set_option to work.

This commit is contained in:
taigacon 2018-03-05 22:10:41 +08:00
parent d5e4915ebe
commit 140f3aa280

2
png.c
View File

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