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 {
char title_name[0x80+1] = { 0 };
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
if (linebrk) *linebrk = '\0';
for (char *c = title_name; *c; c++) {
if (*c == "\n") {
*c = " "; //replace any remaining newlines with a space, to merge the parts
}
// search for the last occurence of newline, because
// everything until the last newline is part of the name
char* linebrk = strrchr(title_name, '\n');
if (linebrk) {
*linebrk = '\0';
// 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