From 0ab6c15f05cd6e4fc42fec750fc515a24dafa842 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Mar 2015 22:55:27 -0500 Subject: [PATCH] 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. --- Source/Glide64/Main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Glide64/Main.cpp b/Source/Glide64/Main.cpp index 65f67f596..0f150145b 100644 --- a/Source/Glide64/Main.cpp +++ b/Source/Glide64/Main.cpp @@ -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 > '~')