From 9dc9033b764a0f1e4662e0cf8c8a0a1dcfaba82f Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Tue, 7 Feb 2017 09:56:19 -0500 Subject: [PATCH] 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. --- Source/Core/Core/PowerPC/PPCSymbolDB.cpp | 2 ++ 1 file changed, 2 insertions(+) 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)