mirror of
https://github.com/sdsykes/fastimage.git
synced 2025-09-20 00:01:59 -04:00
Fix GIF global color table flag check
Zero is a truthy value, which is a problem when checking flags.
This commit is contained in:
parent
f1628c1539
commit
c78578c097
@ -585,7 +585,7 @@ class FastImage
|
||||
|
||||
# fields (1) + bg color (1) + pixel ratio (1)
|
||||
fields = @stream.read(3).unpack("CCC")[0]
|
||||
if fields & 0x80 # Global Color Table
|
||||
if fields & 0x80 != 0 # Global Color Table
|
||||
# 2 * (depth + 1) colors, each occupying 3 bytes (RGB)
|
||||
@stream.skip(3 * 2 ** ((fields & 0x7) + 1))
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user