fix alignment check on pointer

This commit is contained in:
Mark McCaskey 2019-03-26 09:56:23 -07:00
parent ccb5b0f7b3
commit d2818b1ffa

View File

@ -266,7 +266,7 @@ pub fn ___syscall140(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
let ret = unsafe { lseek(fd, offset, whence) as i32 };
#[allow(clippy::cast_ptr_alignment)]
let result_ptr = emscripten_memory_pointer!(ctx.memory(0), result_ptr_value) as *mut i32;
assert_eq!(4, mem::align_of_val(&result_ptr));
assert_eq!(8, mem::align_of_val(&result_ptr));
unsafe {
*result_ptr = ret;
}