Fix strings -> chars

This commit is contained in:
d0k3 2021-07-06 18:48:04 +02:00
parent ef161bce42
commit 33a115b75c

View File

@ -4014,14 +4014,14 @@ u32 GetGoodName(char* name, const char* path, bool quick) {
} else { } else {
char title_name[0x80+1] = { 0 }; char title_name[0x80+1] = { 0 };
if (GetTwlTitle(title_name, (TwlIconData*) icon) != 0) return 1; if (GetTwlTitle(title_name, (TwlIconData*) icon) != 0) return 1;
char* linebrk = strrchr(title_name, '\n'); // search for the last occurence of newline, because everything until the last newline is part of the name // search for the last occurence of newline, because
// everything until the last newline is part of the name
if (linebrk) *linebrk = '\0'; char* linebrk = strrchr(title_name, '\n');
if (linebrk) {
for (char *c = title_name; *c; c++) { *linebrk = '\0';
if (*c == "\n") { // replace any remaining newlines with a space, to merge the parts
*c = " "; //replace any remaining newlines with a space, to merge the parts for (char* c = title_name; *c; c++)
} if (*c == '\n') *c = ' ';
} }
if (twl->unit_code & 0x02) { // TWL if (twl->unit_code & 0x02) { // TWL