Load null bytes as whitespace.

A few lines down in this file, there is a while() loop that removes all trailing spaces to replace them with null bytes, so "SUPER MARIO 64      " becomes "SUPER MARIO 64", whether or not we converted null bytes to spaces.  Also, the null byte is not documented to be a valid character for game developers to use in their ROM headers, even though for a few ROMs this is being done anyway.
This commit is contained in:
unknown 2015-03-01 22:55:27 -05:00
parent 16117e0e4c
commit 0ab6c15f05
1 changed files with 2 additions and 0 deletions

View File

@ -1737,6 +1737,8 @@ void CALL RomOpen (void)
const char invalid_ch = '?'; /* Some Japanese games use wide chars. */
ch = (char)gfx.HEADER[(32 + i) ^ 3];
if (ch == '\0')
ch = ' ';
if (ch < ' ')
ch = invalid_ch;
if (ch > '~')