mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-11 04:07:39 +02:00
renderers: Fix HexBytes formatter to apply padding also at the end of the string, ensuring proper output alignment when the pretty renderer justifies each line to the right
This commit is contained in:
@@ -51,8 +51,10 @@ def hex_bytes_as_text(value: bytes, width: int = 16) -> str:
|
||||
|
||||
# Handle leftovers when the lenght is not mutiple of width
|
||||
if printables:
|
||||
output += " " * (width - len(printables))
|
||||
padding = width - len(printables)
|
||||
output += " " * (padding)
|
||||
output += printables
|
||||
output += " " * (padding)
|
||||
|
||||
return output
|
||||
|
||||
|
||||
Reference in New Issue
Block a user