Skip to content

Commit 6b4c5b8

Browse files
committed
Fix 'RtlGenRandom' argument slots
1 parent 5e07ff6 commit 6b4c5b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fn_call.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,8 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
756756
}
757757
// The actual name of 'RtlGenRandom'
758758
"SystemFunction036" => {
759-
let ptr = this.read_scalar(args[1])?.to_ptr()?;
760-
let len = this.read_scalar(args[2])?.to_usize(this)?;
759+
let ptr = this.read_scalar(args[0])?.to_ptr()?;
760+
let len = this.read_scalar(args[1])?.to_usize(this)?;
761761

762762
let data = gen_random(this, len as usize)?;
763763
this.memory_mut().get_mut(ptr.alloc_id)?

0 commit comments

Comments
 (0)