Relax *.ani file length requirement in RIFF header

Many *.ani files online have incorrect length in the RIFF header, see #5, #6
This commit is contained in:
Quantum 2021-03-09 15:47:32 -05:00
parent 21682f624d
commit ac9552ce83

View file

@ -32,7 +32,7 @@ class ANIParser(BaseParser):
signature, size, subtype = cls.RIFF_HEADER.unpack(blob[:cls.RIFF_HEADER.size])
except struct.error:
return False
return signature == cls.SIGNATURE and size == len(blob) - 8 and subtype == cls.ANI_TYPE
return signature == cls.SIGNATURE and subtype == cls.ANI_TYPE
def __init__(self, blob: bytes) -> None:
super().__init__(blob)