hex
hex copied to clipboard
Fixed misaligned paddings when formats other than prefixed hex are used
When a line is shorter than the specifies column width (-c
), and padding is required, the padding amount per byte was hardcoded to 5
, which corresponds to the width of one prefixed hex byte plus a space. This causes misalignment when other formattings are used.
This fix selects the appropriate padding width based on the format type.
Just committed to fix the linter errors
Added a unit test to check for misaligned padding