fix bug that made the program freeze if TAB (\t) is used in the pony file

This commit is contained in:
Mattias Andrée 2012-10-23 22:27:20 +02:00
parent e726084422
commit bcd88c9862

View file

@ -1510,10 +1510,10 @@ class Backend():
while i < n: while i < n:
c = self.pony[i] c = self.pony[i]
if c == '\t': if c == '\t':
n += 8 - (indent & 7) n += 7 - (indent & 7)
ed = ' ' * (7 - (indent & 7)) ed = ' ' * (8 - (indent & 7))
c = ' ' c = ' '
self.pony = self.pony[:i] + ed + self.pony[i:] self.pony = self.pony[:i] + ed + self.pony[i + 1:]
i += 1 i += 1
if c == '$': if c == '$':
if dollar is not None: if dollar is not None: