diff --git a/src/lib.rs b/src/lib.rs index 522507c..dea1df0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,7 +70,7 @@ pub fn give_up() -> Box { }; for _ in 0..size { - v.push((rng.rand_u32() % 256) as u8); + v.push((rng.rand_u32() & u32::from(u8::MAX)) as u8); } crate::transmute(v.into_boxed_slice())