Skip to content

Commit 55863cb

Browse files
committed
Use force_ptr instead of assert_ptr
1 parent fa20338 commit 55863cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
2929
if this.tcx.lang_items().align_offset_fn() == Some(instance.def.def_id()) {
3030

3131
let n = {
32-
let ptr = this.read_scalar(args[0])?.not_undef()?.assert_ptr();
32+
let ptr = this.force_ptr(this.read_scalar(args[0])?.not_undef()?)?;
3333
let align = this.force_bits(
3434
this.read_scalar(args[1])?.not_undef()?,
3535
this.pointer_size()

0 commit comments

Comments
 (0)