summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2013-05-18 03:26:06 -0400
committeryenatch <yenatch@gmail.com>2013-05-18 04:46:52 -0400
commit829fa1d626beca49d78725ad719309808cc866dc (patch)
treee8fb9242935e1facbe39923d649b71b9ea4fd68a
parente4cf93bff1cde766b1298235969725c1c9628b7f (diff)
gfx: safer alternating-byte detection in compression
original-commit-id: e3565bd7007b194b04ceecaf1909fff65062211f
-rw-r--r--gfx.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gfx.py b/gfx.py
index 8898f77..54cd04c 100644
--- a/gfx.py
+++ b/gfx.py
@@ -467,7 +467,7 @@ class Compressed:
num_alts = 0
# make sure we don't check for alts at the end of the file
- if self.address+2 >= self.end: return False
+ if self.address+3 >= self.end: return False
self.alts.append(self.byte)
self.alts.append(ord(self.image[self.address+1]))