pret / pokecrystal

Disassembly of Pokémon Crystal
https://pret.github.io/pokecrystal/
2.07k stars 779 forks source link

Processing an apostrophe doesn't check if it's the last character #187

Closed dannye closed 11 years ago

dannye commented 11 years ago

Writing something like: db "Farfetch'","d" will cause the text processor to check the character after the apostrophe to see what letter it is which will load a different text tile ('d, 's etc) but it does not check to see if the apostrophe is the last character of the string, and if the apostrophe is the last character of the string, compiling results in "IndexError: string index out of range".

Sanqui commented 11 years ago

This has always worked fine in pokecrystal. I think it's just the pokered preprocessor that's hosed.

Proof: https://github.com/kanzure/pokecrystal-demo/blob/master/stats/pokemon_names.asm#L83 4 month old commit, pokecrystal-demo compiles.

kanzure commented 11 years ago

Well, if that's the case, then when pokered gets the new preprocessor soon, this will no longer be a problem. Someone has to submit a branch of ... oh, it looks like pokered is already using the new preprocessor. So it should work if you merge iimarckus/master into your pokered branch.