Skip to content

Commit

Permalink
fix: pal needs u8
Browse files Browse the repository at this point in the history
  • Loading branch information
nhtyy committed Jan 8, 2025
1 parent 6839b49 commit db5963b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/sys/pal/zkvm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ pub fn abort_internal() -> ! {
}

pub fn hashmap_random_keys() -> (u64, u64) {
let mut buf = [0u32; 16];
let mut buf = [0u8; 16];
unsafe {
abi::sys_rand(buf.as_mut_ptr(), buf.len());
};
let a = u64::from_le_bytes(buf[0..8].try_into().unwrap());
let b = u64::from_le_bytes(buf[8..16].try_into().unwrap());
(a, b)
}
}

0 comments on commit db5963b

Please sign in to comment.