Use pointer::add instead of pointer::offset with a cast.

This commit is contained in:
Dan Gohman
2019-11-08 16:22:41 -08:00
parent 39b0d670c5
commit 5b0031ece8
3 changed files with 5 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ unsafe extern "C" fn stub_fn(vmctx: *mut VMContext, call_id: u32, values_vec: *m
Ok(()) => {
for i in 0..returns_len {
// TODO check signature.returns[i].value_type ?
returns[i].write_value_to(values_vec.offset(i as isize));
returns[i].write_value_to(values_vec.add(i));
}
0
}