mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
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:
parent
8d124a250a
commit
07c60a383a
2
png.c
2
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 setting = (2U + (onoff != 0)) << option;
|
||||||
unsigned int current = png_ptr->options;
|
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;
|
return (current & mask) >> option;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user