[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/04: grc: fix IndexError when consuming \
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/04: grc: fix IndexError when consuming \b in console (#1043) |
Date: |
Fri, 21 Oct 2016 19:00:27 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit dc5a05d68888a9924d1f15bc58a80c7e54bfffe0
Author: Sebastian Koslowski <address@hidden>
Date: Fri Oct 21 09:20:22 2016 +0200
grc: fix IndexError when consuming \b in console (#1043)
---
grc/gui/Dialogs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index 1d11435..83ad965 100644
--- a/grc/gui/Dialogs.py
+++ b/grc/gui/Dialogs.py
@@ -72,7 +72,7 @@ class TextDisplay(SimpleTextDisplay):
# for each \b delete one char from the buffer
back_count = 0
start_iter = self.get_buffer().get_end_iter()
- while line[back_count] == '\b':
+ while len(line) > back_count and line[back_count] == '\b':
# stop at the beginning of a line
if not start_iter.starts_line(): start_iter.backward_char()
back_count += 1