Commits

C Nelson committed 78bf2c8

Unknown characters are now replaced with the space character instead of erroring.

Comments (0)

Files changed (2)

 	ld b, $0f
 	jp Bankswitch
 .alreadyHasSubstitute
-	ld hl, UnnamedText_17e22  ;"x has a substitute"
+	ld hl, UnnamedText_17e22  ;"____ has a substitute"
 	jr .printText
 .notEnoughHP
 	ld hl, UnnamedText_17e27  ;"too weak to make substitute"
                         char = char + token[0]
                         token = token[1:]
 
-                sys.stdout.write("${0:02X}".format(chars[char]))
+                sys.stdout.write("${0:02X}".format(chars.get(char, 0x7f)))
 
                 if len(token):
                     sys.stdout.write(", ")