Fix parsing of hinting instructions that end in a PUSHB

Sounds useless, but MReifutaiM-Regular.ttf seems to have that, and the
parsing back from XML was failing because we expected a token whereas
after dropping whitespace there wasn't any left.
This commit is contained in:
Behdad Esfahbod 2013-11-18 16:03:38 -05:00
parent 17700bf926
commit fc4f438496

View File

@ -300,8 +300,8 @@ class Program:
push(op)
else:
args = []
pos = skipWhite(assembly, pos)
while pos < lenAssembly:
pos = skipWhite(assembly, pos)
m = _tokenRE.match(assembly, pos)
if m is None:
raise tt_instructions_error, "Syntax error in TT program (%s)" % assembly[pos:pos+15]
@ -309,6 +309,7 @@ class Program:
if number is None and comment is None:
break
pos = m.regs[0][1]
pos = skipWhite(assembly, pos)
if comment is not None:
continue
args.append(int(number))