Skip to content

Commit

Permalink
Fix panic in Hc128Rng::fill_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Mar 2, 2018
1 parent a682402 commit ea09dc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prng/hc128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ impl RngCore for Hc128Rng {
filled += filled_u8;
}

let len_remainder = (dest.len() - filled) % 16;
let len_remainder = (dest.len() - filled) % (16 * 4);
let len_direct = dest.len() - len_remainder;

while filled < len_direct {
Expand Down

0 comments on commit ea09dc0

Please sign in to comment.