From 11f1d51e5a08ce44ddcdc308fd2f6d942760e7d4 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 20 May 2021 11:53:22 +0200 Subject: [PATCH] deflate: fix align() in inflate --- nihav-core/src/compr/deflate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-core/src/compr/deflate.rs b/nihav-core/src/compr/deflate.rs index 7d6fae5..e917519 100644 --- a/nihav-core/src/compr/deflate.rs +++ b/nihav-core/src/compr/deflate.rs @@ -174,7 +174,7 @@ impl<'a> CurrentSource<'a> { fn align(&mut self) { let b = self.br.bits & 7; if b != 0 { - self.skip_cache(8 - (b as u8)); + self.skip_cache(b); } } fn left(&self) -> isize { -- 2.39.5