Skip to content

Commit 4d628c8

Browse files
authored
Merge pull request #1376 from gcmoreira/fix_pretty_renderer_hex_bytes_as_text
Renderers - Fix HexBytes formatter for pretty renderer
2 parents 9222f49 + 3c20e46 commit 4d628c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

volatility3/cli/text_renderer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ def hex_bytes_as_text(value: bytes, width: int = 16) -> str:
5151

5252
# Handle leftovers when the lenght is not mutiple of width
5353
if printables:
54-
output += " " * (width - len(printables))
54+
padding = width - len(printables)
55+
output += " " * (padding)
5556
output += printables
57+
output += " " * (padding)
5658

5759
return output
5860

0 commit comments

Comments
 (0)