fix hexdump alignment for non-multiple-of-16 size

This commit is contained in:
pantonshire committed 2024-08-10 18:25:39 +01:00
1 parent d1ee14003c
commit 88aa06627c
1 file changed
+1 -1
+1 -1
View File
@@ -97,7 +97,7 @@ impl<'a> InputBytes<'a> {
for b in chunk { for b in chunk {
print!(" {:02x}", b); print!(" {:02x}", b);
} }
print!("{: <4}", ""); print!("{: <1$}", "", 4 + 3 * (16 - chunk.len()));
for b in chunk { for b in chunk {
let c = match char::from(*b) { let c = match char::from(*b) {
c if c.is_ascii_graphic() => c, c if c.is_ascii_graphic() => c,