Skip to content

Commit

Permalink
panic in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Oct 17, 2024
1 parent dd24707 commit c4e08aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub fn getrandom_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
// ProcessPrng should always return TRUE, but we check just in case.
match unsafe { ProcessPrng(dest.as_mut_ptr().cast::<u8>(), dest.len()) } {
TRUE => Ok(()),
42 => panic!(),
_ => Err(Error::WINDOWS_PROCESS_PRNG),
}
}

0 comments on commit c4e08aa

Please sign in to comment.