Skip to content

Commit ed0feee

Browse files
authored
Merge pull request rust-lang#149 from dwrensha/check-align-argument-order
fix argument order on check_align()
2 parents 5c82b64 + f0e2247 commit ed0feee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/terminator/intrinsic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
410410
let size = self.type_size(ty)?.expect("write_bytes() type must be sized");
411411
let ptr = arg_vals[0].read_ptr(&self.memory)?;
412412
let count = self.value_to_primval(arg_vals[2], usize)?.to_u64()?;
413-
self.memory.check_align(ptr, size * count, ty_align)?;
413+
self.memory.check_align(ptr, ty_align, size * count)?;
414414
self.memory.write_repeat(ptr, val_byte, size * count)?;
415415
}
416416

0 commit comments

Comments
 (0)