Skip to content

Commit 2e0bda8

Browse files
committed
recover deleted comment
1 parent a4b124d commit 2e0bda8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/shims/env.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
6363
let name = this.read_os_str_from_target_str(name_ptr)?;
6464
Ok(match this.machine.env_vars.map.get(&name) {
6565
Some(var_ptr) => {
66+
// The offset is used to strip the "{name}=" part of the string.
6667
Scalar::from(var_ptr.offset(Size::from_bytes(u64::try_from(name.len()).unwrap().checked_add(1).unwrap()), this)?)
6768
}
6869
None => Scalar::ptr_null(&*this.tcx),

0 commit comments

Comments
 (0)