1
Fork 0

fix argument order on check_align

This commit is contained in:
David Renshaw 2017-03-13 21:07:25 -04:00
parent 5c82b64ce6
commit f0e2247f4d

View file

@ -410,7 +410,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
let size = self.type_size(ty)?.expect("write_bytes() type must be sized");
let ptr = arg_vals[0].read_ptr(&self.memory)?;
let count = self.value_to_primval(arg_vals[2], usize)?.to_u64()?;
self.memory.check_align(ptr, size * count, ty_align)?;
self.memory.check_align(ptr, ty_align, size * count)?;
self.memory.write_repeat(ptr, val_byte, size * count)?;
}