From 0037d69e99f04b4c8ce7c7d80622b07244b5d83a Mon Sep 17 00:00:00 2001 From: Moritz Borcherding Date: Fri, 19 Apr 2024 16:45:38 +0200 Subject: [PATCH] just make all requests at most 56 bits --- src/decoding/bit_reader_reverse.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/decoding/bit_reader_reverse.rs b/src/decoding/bit_reader_reverse.rs index 639e4657..c86d4343 100644 --- a/src/decoding/bit_reader_reverse.rs +++ b/src/decoding/bit_reader_reverse.rs @@ -116,6 +116,7 @@ impl<'s> BitReaderReversed<'s> { #[cold] fn get_bits_cold(&mut self, n: u8) -> u64 { + let n = u8::min(n, 56); let signed_n = n as isize; if self.bits_remaining() <= 0 {