diff --git a/sopass.py b/sopass.py index aace876..0afbb6a 100755 --- a/sopass.py +++ b/sopass.py @@ -25,7 +25,7 @@ class Direction: def hexdump(data: bytes) -> list[str]: # We will be prefixing the lines with sigils, so no need to join. result = [] offset = 0 - offset_len = math.ceil(math.log(len(data), 16)) + offset_len = math.ceil(math.log(len(data)+1, 16)) while data: left_chunk, right_chunk, data = data[:8], data[8:16], data[16:] left_ascii = ''.join(chr(x) if x in range(32,127) else '.' for x in left_chunk)