Permalink
Browse files

gui.ansi: Fix crash https://savannah.nongnu.org/bugs/?37346

  • Loading branch information...
1 parent ffd0a1a commit 9cac7eb77745afce21851a3f031bb6e41f98bfa5 @hut hut committed Oct 3, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 ranger/gui/ansi.py
View
@@ -21,6 +21,9 @@ def text_with_fg_bg_attr(ansi_text):
if chunk[-1] != 'm':
continue
match = re.match(r'^.\[(.*).$', chunk)
+ if not match:
+ # XXX I have no test case to determine what should happen here
+ continue
attr_args = match.group(1)
fg, bg, attr = -1, -1, 0

0 comments on commit 9cac7eb

Please sign in to comment.