From 8a72ef7e215d96d9014e9b4a52432d6ffc231064 Mon Sep 17 00:00:00 2001 From: jpk Date: Thu, 15 Dec 2022 13:11:37 +0100 Subject: [PATCH] fix output when uneven input length --- src/tohex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tohex.rs b/src/tohex.rs index 96cbeb2..ab4965d 100644 --- a/src/tohex.rs +++ b/src/tohex.rs @@ -11,7 +11,7 @@ fn dump_to_hex(bytes: &mut [u8]) -> String { if c.len() == 2 { format!("{}{}", map_u8_to_color(c[0]), map_u8_to_color(c[1])) } else { - map_u8_to_color(c[0]) + format!("{} ", map_u8_to_color(c[0])) } }) .collect();