Skip to content

Commit

Permalink
refactor: refactoring search string
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Jun 27, 2024
1 parent 6df7337 commit a297a9f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/pl/SymbolProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,12 @@ void initFunctionMap(std::string_view compressed) {
rrva |= (uint32_t)(data[i] & 0x7F) << shift_amount;
shift_amount += 7;
} while ((data[i++] & 0x80) != 0);
rva += rrva;

if (skipped) {
for (; data[i] != '\n'; i++) {}
continue;
}
std::string name;
for (; data[i] != '\n'; i++) { name += data[i]; }
rva += rrva;
auto begin = i;
i = data.find_first_of('\n', begin);
if (i == std::string::npos) { break; }
if (skipped) { continue; }
std::string name(data, begin, i - begin);
if (!fromModule) {
auto fake = pl::fake_symbol::getFakeSymbol(name);
if (fake.has_value()) funcMap->emplace(fake.value(), rva);
Expand Down

0 comments on commit a297a9f

Please sign in to comment.