Fix decompressing some Pop'n Music images.

This commit is contained in:
Jennifer Taylor 2019-06-24 22:36:11 +00:00
parent 2199686b33
commit efb51c15f0
1 changed files with 6 additions and 2 deletions

View File

@ -62,8 +62,12 @@ class LZSSDecompressor:
yield data
elif flag == self.FLAG_BACKREF:
# Backref into window buffer setup
high = self.data[self.consumed]
low = self.data[self.consumed + 1]
try:
high = self.data[self.consumed]
low = self.data[self.consumed + 1]
except IndexError:
# We're done reading, nothing else to do
return
if (
low == 0 and high == 0 and