From bcd88c986259cd5ab2d38d26a2d7e5939725940d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 23 Oct 2012 22:27:20 +0200 Subject: fix bug that made the program freeze if TAB (\t) is used in the pony file --- ponysay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ponysay.py b/ponysay.py index 502b85f..48cbaf7 100755 --- a/ponysay.py +++ b/ponysay.py @@ -1510,10 +1510,10 @@ class Backend(): while i < n: c = self.pony[i] if c == '\t': - n += 8 - (indent & 7) - ed = ' ' * (7 - (indent & 7)) + n += 7 - (indent & 7) + ed = ' ' * (8 - (indent & 7)) c = ' ' - self.pony = self.pony[:i] + ed + self.pony[i:] + self.pony = self.pony[:i] + ed + self.pony[i + 1:] i += 1 if c == '$': if dollar is not None: -- cgit