Skip to content

Commit e131e08

Browse files
author
inoahdev
committed
Use index variable when accessing data in string-table
1 parent 506bb96 commit e131e08

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mach-o/utils/tbd-create.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ namespace macho::utils {
10451045

10461046
// Skip size 0 strings
10471047

1048-
auto string = &string_table[iter->n_un.n_strx];
1048+
auto string = &string_table[index];
10491049
if (*string == '\0') {
10501050
continue;
10511051
}
@@ -1246,7 +1246,6 @@ namespace macho::utils {
12461246
string = &string[string_index];
12471247
string_length -= string_index;
12481248

1249-
12501249
const auto symbols_end = this->symbols.end();
12511250

12521251
// An optimization can be made here to remove

0 commit comments

Comments
 (0)