mirror of
https://github.com/erkin/ponysay.git
synced 2025-03-03 16:01:27 +01:00
fix bug that made the program freeze if TAB (\t) is used in the pony file
This commit is contained in:
parent
e726084422
commit
bcd88c9862
1 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue