shithub: pokecrystal

Download patch

ref: 7d17027ffbc9a84cfb981bcadd76d5f2a052b7fa
parent: 133bcb70498f53cef584016615156cbe5bb7b447
author: Bryan Bishop <[email protected]>
date: Fri May 4 16:14:00 EDT 2012

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

--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -1963,6 +1963,10 @@
                 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":