diff --git a/src/machine/stack.rs b/src/machine/stack.rs index 382569ed4..42f9d8d2f 100644 --- a/src/machine/stack.rs +++ b/src/machine/stack.rs @@ -237,7 +237,7 @@ impl Stack { for idx in 0..num_cells { ptr::write( - (new_ptr as usize + offset) as *mut HeapCellValue, + new_ptr.add(offset).cast::(), stack_loc_as_cell!(OrFrame, b, idx), );