From e3565bd7007b194b04ceecaf1909fff65062211f Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 18 May 2013 03:26:06 -0400 Subject: [PATCH] gfx: safer alternating-byte detection in compression --- extras/gfx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/gfx.py b/extras/gfx.py index 8898f77cf..54cd04c5b 100644 --- a/extras/gfx.py +++ b/extras/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]))