Fix png_set_option to work.
This commit is contained in:
parent
d5e4915ebe
commit
140f3aa280
2
png.c
2
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user