diff options
-rw-r--r-- | libdwarf/dwarf_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdwarf/dwarf_init.c b/libdwarf/dwarf_init.c index 8fd5761..7749345 100644 --- a/libdwarf/dwarf_init.c +++ b/libdwarf/dwarf_init.c @@ -610,7 +610,7 @@ dwarf_elf_read(Dwarf_Debug dbg, Dwarf_Error *error) } /* Get the section index to the string table. */ - if (elf_getshstrndx(dbg->dbg_elf, &dbg->dbg_stnum) == 0) { + if (elf_getshdrstrndx(dbg->dbg_elf, &dbg->dbg_stnum) == -1) { DWARF_SET_ELF_ERROR(error, elf_errno()); return DWARF_E_ELF; } |