diff options
-rw-r--r-- | sploit/symtbl.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sploit/symtbl.py b/sploit/symtbl.py index e51b72d..ce57277 100644 --- a/sploit/symtbl.py +++ b/sploit/symtbl.py @@ -173,7 +173,8 @@ class SymtblImpl: """Return human-readable Symtbl""" FMT = "\n{:<20} {:<20}" s = f"{len(self)} symbols @ {hex(self)}" - s += FMT.format("ADDRESS", "SYMBOL") + if len(self) > 0: + s += FMT.format("ADDRESS", "SYMBOL") for symbol, offset in sorted(self, key=lambda v: int(v[1])): disp = f"[{symbol}]" if type(offset) is not int else symbol s += FMT.format(hex(offset), disp) |