diff --git a/Cargo.toml b/Cargo.toml index 843b97b5..bfb5b280 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "brotli" -version = "1.1.1" +version = "1.1.2" authors = ["Daniel Reiter Horn ", "The Brotli Authors"] description = "A brotli decompressor that with an interface avoiding the rust stdlib. This makes it suitable for embedded devices and kernels. It is designed with a pluggable allocator so that the standard lib's allocator may be employed. The default build also includes a stdlib allocator and stream interface. Disable this with --features=no-stdlib. All included code is safe." license = "BSD-3-Clause/MIT" @@ -29,4 +29,4 @@ no-stdlib = ["alloc-no-stdlib/no-stdlib", "brotli-decompressor/no-stdlib"] external-literal-probability = [] disable-timer = ["brotli-decompressor/disable-timer"] benchmark = ["brotli-decompressor/benchmark"] -vector_scratch_space = [] \ No newline at end of file +vector_scratch_space = [] diff --git a/src/enc/backward_references.rs b/src/enc/backward_references.rs index 19fea15d..1c96b4d2 100755 --- a/src/enc/backward_references.rs +++ b/src/enc/backward_references.rs @@ -335,9 +335,9 @@ impl + SliceWrapper + BasicHashComputer> AnyHasher out, 1i32); } + let bucket_sweep = self.buckets_.BUCKET_SWEEP() as usize; (*self).buckets_.slice_mut()[(key as (usize)).wrapping_add((cur_ix >> 3) - .wrapping_rem(self.buckets_.BUCKET_SWEEP() as - usize))] = cur_ix as (u32); + .wrapping_rem(bucket_sweep))] = cur_ix as (u32); is_match_found != 0 }