From 2c328c40b15d7914acf3069f08d8708163b22ac3 Mon Sep 17 00:00:00 2001 From: jakcron Date: Sun, 9 Sep 2018 16:43:40 +0800 Subject: [PATCH] [nstool] Fix bug in ElfSymbolParser --- programs/nstool/source/ElfSymbolParser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/programs/nstool/source/ElfSymbolParser.cpp b/programs/nstool/source/ElfSymbolParser.cpp index 9f4bed9..b57c9f2 100644 --- a/programs/nstool/source/ElfSymbolParser.cpp +++ b/programs/nstool/source/ElfSymbolParser.cpp @@ -22,7 +22,6 @@ bool ElfSymbolParser::operator!=(const ElfSymbolParser& other) const void ElfSymbolParser::parseData(const byte_t *dyn_sym, size_t dyn_sym_size, const byte_t *dyn_str, size_t dyn_str_size, bool is64Bit) { - //printf("ElfSymbolParser::parseData()"); size_t dynSymSize = is64Bit ? sizeof(fnd::Elf64_Sym) : sizeof(fnd::Elf32_Sym); sElfSymbol symbol; @@ -50,7 +49,7 @@ void ElfSymbolParser::parseData(const byte_t *dyn_sym, size_t dyn_sym_size, cons throw fnd::Exception(kModuleName, "Out of bounds symbol name offset"); } - for (; dyn_str[name_pos] == 0x00 && name_pos < dyn_str_size; name_pos++); + //for (; dyn_str[name_pos] == 0x00 && name_pos < dyn_str_size; name_pos++); symbol.name = std::string((char*)&dyn_str[name_pos]); mSymbolList.addElement(symbol);