Skip to content

Commit 2f7343f

Browse files
committed
off-by-1
1 parent 2fd5605 commit 2f7343f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/native_lib/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
242242
..std::cmp::min(alloc.len(), rg.end.strict_sub(alloc_addr));
243243
// Skip forward however many bytes of the access are contained in the current
244244
// allocation.
245-
rg.advance_by(overlap.len()).unwrap();
245+
rg.advance_by(overlap.len().strict_sub(1)).unwrap();
246246

247247
match evt {
248248
AccessEvent::Read(_) => {

0 commit comments

Comments
 (0)