mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:34 +00:00
Track squeeze_byte correctly
This commit is contained in:
1 parent
094bf63f02
commit
b36d74ed9d
1 file changed
+5
-1
+5
-1
@@ -284,7 +284,7 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
|
||||
squeezer: Squeezer::new(use_squeeze, 8 * panels as u64),
|
||||
display_offset: 0,
|
||||
panels,
|
||||
squeeze_byte: 0xFF,
|
||||
squeeze_byte: 0x00,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -496,6 +496,10 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
|
||||
self.squeezer.process(b, self.idx);
|
||||
let new_active = self.squeezer.active();
|
||||
|
||||
if new_active {
|
||||
self.squeeze_byte = b;
|
||||
}
|
||||
|
||||
// the header should be the first thing printed
|
||||
if self.idx == 0 {
|
||||
self.print_header()?;
|
||||
|
||||
Reference in new issue
Block a user