make sure the bytes don't run out with no ending byte in MainText

This commit is contained in:
Bryan Bishop 2012-05-04 20:14:00 -05:00
parent 133bcb7049
commit 7d17027ffb
1 changed files with 4 additions and 0 deletions

View File

@ -1963,6 +1963,10 @@ class MainText(TextCommand):
new_line = False
was_comma = False
# this shouldn't happen because of the rom_until calls in the parse method
if not end:
raise Exception, "ran out of bytes without the script ending?"
# last character may or may not be allowed to be a newline?
# Script.to_asm() has command.to_asm()+"\n"
if output[-1] == "\n":