mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:31 +00:00
Fix for empty files
This commit is contained in:
1 parent
94980a817e
commit
4b7c44c207
1 file changed
+4
@@ -131,6 +131,10 @@ impl<'a> Printer<'a> {
|
||||
fn print_textline(&mut self) -> io::Result<()> {
|
||||
let len = self.line.len();
|
||||
|
||||
if len == 0 {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let fill_spaces_front = match len {
|
||||
n if n < 8 => 1 + 3 * (16 - n),
|
||||
n => 3 * (16 - n),
|
||||
|
||||
Reference in new issue
Block a user