Skip to content

Commit

Permalink
test: Bug fix? Explicitly type int that may become as large as 3 << 29
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0methean committed Jun 4, 2024
1 parent 7ffcfce commit cb50ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb50ca1

Please sign in to comment.