Track squeeze_byte correctly

This commit is contained in:
Sharif Haason authored and David Peter committed 2022-11-13 22:15:41 +01:00
1 parent 094bf63f02
commit b36d74ed9d
1 file changed
+5 -1
+5 -1
View File
@@ -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()?;