mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-25 00:27:39 +01:00
Check correct variable for offset in tests/Gtest-init.cxx
Checking `off' for positiveness does not make any sense, check `offset' instead.
This commit is contained in:
parent
6470a67461
commit
ffbe29940e
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ do_backtrace (void)
|
|||
name[0] = '\0';
|
||||
off[0] = '\0';
|
||||
if (unw_get_proc_name (&cursor, name, sizeof (name), &offset) == 0
|
||||
&& off > 0)
|
||||
&& offset > 0)
|
||||
snprintf (off, sizeof (off), "+0x%lx", (long) offset);
|
||||
if (verbose)
|
||||
printf (" [%lx] <%s%s>\n", (long) ip, name, off);
|
||||
|
|
Loading…
Reference in a new issue