Skip to content

Commit

Permalink
Fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Sep 27, 2024
1 parent f6971c7 commit 289b068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub fn getrandom_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
let ret = unsafe { random_get(dest.as_mut_ptr() as i32, dest.len() as i32) };
match ret {
0 => Ok(()),
_ => Err(Error::from_os_error(ret.into())),
_ => Err(Error::from_os_error(ret as u32)),
}
}

Expand Down

0 comments on commit 289b068

Please sign in to comment.