Fix symbols name from maps taking 2 lines instead of one
Symbols map may not only end with a \n, but they may also end with \r\n and only the \n would get removed. This is the case with the Super Mario Sunshine map file which resulted in a weird looking symbols list and thus made it harder to scroll through it. This removes the \r after the \n has been removed if it's present.
This commit is contained in:
parent
bdf09c7d3b
commit
9dc9033b76
|
@ -356,6 +356,8 @@ bool PPCSymbolDB::LoadMap(const std::string& filename, bool bad)
|
|||
if (namepos != nullptr) // would be odd if not :P
|
||||
strcpy(name, namepos);
|
||||
name[strlen(name) - 1] = 0;
|
||||
if (name[strlen(name) - 1] == '\r')
|
||||
name[strlen(name) - 1] = 0;
|
||||
|
||||
// Check if this is a valid entry.
|
||||
if (strcmp(name, ".text") != 0 && strcmp(name, ".init") != 0 && strlen(name) > 0)
|
||||
|
|
Loading…
Reference in New Issue