Merge pull request #4846 from aldelaro5/fix-symbols-newline

Fix symbols name from maps taking 2 lines instead of one
This commit is contained in:
Matthew Parlane 2017-02-08 18:18:56 +13:00 committed by GitHub
commit 4b7dd1f638
1 changed files with 2 additions and 0 deletions

View File

@ -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)