]> git.nihav.org Git - nihav.git/commitdiff
deflate: fix align() in inflate
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 20 May 2021 09:53:22 +0000 (11:53 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 20 May 2021 09:53:22 +0000 (11:53 +0200)
nihav-core/src/compr/deflate.rs

index 7d6fae5eafd5174bedfd5c3d96e93ad85cc35bd8..e917519a520def5b570f14e3677b6bbba1d0beb7 100644 (file)
@@ -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 {