Replace all invalid characters when dumping DS ROM

Co-Authored-By: Pk11 <epicpkmn11@outlook.com>
This commit is contained in:
RocketRobz 2021-01-27 17:21:27 -07:00
parent 49c40dbf53
commit 7eef467119

View File

@ -367,9 +367,18 @@ void ndsCardDump(void) {
if (gameTitle[0] == 0 || gameTitle[0] == 0x2E || gameTitle[0] == 0xFF) { if (gameTitle[0] == 0 || gameTitle[0] == 0x2E || gameTitle[0] == 0xFF) {
sprintf(gameTitle, "NO-TITLE"); sprintf(gameTitle, "NO-TITLE");
} else { } else {
for (int i = 0; i < 13; i++) { for(uint i = 0; i < sizeof(gameTitle); i++) {
if (gameTitle[i] == 0x2F || gameTitle[i] == 0x5C) { switch(gameTitle[i]) {
gameTitle[i] = '_'; case '>':
case '<':
case ':':
case '"':
case '/':
case '\x5C':
case '|':
case '?':
case '*':
gameTitle[i] = '_';
} }
} }
} }