From cb50ca121350457c5fba1f0a7c3b3e907c7d2b2d Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:12:54 -0700 Subject: [PATCH] test: Bug fix? Explicitly type int that may become as large as 3 << 29 --- src/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write.rs b/src/write.rs index d140acc88d..f6791f2dbf 100644 --- a/src/write.rs +++ b/src/write.rs @@ -288,7 +288,7 @@ impl<'a> arbitrary::Arbitrary<'a> for FileOptions<'a, ExtendedFileOptions> { #[cfg(feature = "deflate-zopfli")] if options.compression_method == CompressionMethod::Deflated && bool::arbitrary(u)? { options.zopfli_buffer_size = - Some(1 << u.int_in_range(8..=29)? * if bool::arbitrary(u)? { 2 } else { 3 }); + Some(if bool::arbitrary(u)? { 2 } else { 3 } << u.int_in_range(8..=29)?); } u.arbitrary_loop(Some(0), Some((u16::MAX / 4) as u32), |u| { options