summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authoraldelaro5 <aldelaro5@gmail.com>2017-02-07 09:56:19 -0500
committeraldelaro5 <aldelaro5@gmail.com>2017-02-07 09:56:19 -0500
commit9dc9033b764a0f1e4662e0cf8c8a0a1dcfaba82f (patch)
treebacb3e0ccd26db830edad224ee7371e972539f20 /Source/Core
parentbdf09c7d3bc5a22b562ce0f51400090b13ea8879 (diff)
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.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/PPCSymbolDB.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Core/PowerPC/PPCSymbolDB.cpp b/Source/Core/Core/PowerPC/PPCSymbolDB.cpp
index adc7e56416..367f565458 100644
--- a/Source/Core/Core/PowerPC/PPCSymbolDB.cpp
+++ b/Source/Core/Core/PowerPC/PPCSymbolDB.cpp
@@ -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)