diff --git a/arm9/source/utils/gameutil.c b/arm9/source/utils/gameutil.c index cf2b5c7..a441bd1 100644 --- a/arm9/source/utils/gameutil.c +++ b/arm9/source/utils/gameutil.c @@ -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