Commit 02d40877 authored by Eduardo Souza's avatar Eduardo Souza

Use from_raw_parts function from std::slice instead of expecting the slice directly.

parent e99e2f4a
......@@ -100,10 +100,13 @@ pub struct ArgValue {
pub unsafe extern "C" fn muentry_stack_setup_args(
stack: &mut MuStack,
num_args: usize,
stack_args: &[ArgValue]
array_pointer: *const ArgValue
) {
let mut args = vec![];
let stack_args =
unsafe { std::slice::from_raw_parts(array_pointer, num_args as usize) };
for i in 0..num_args {
let stack_val = *stack_args.get(i).unwrap();
// as described in ValueLocation::from_constant
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment