Skip to content

Commit b508a0e

Browse files
committed
set last error to 0 on function start
1 parent 75e8284 commit b508a0e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/shims/windows/fs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
162162
let this = self.eval_context_mut();
163163
this.assert_target_os("windows", "CreateFileW");
164164
this.check_no_isolation("`CreateFileW`")?;
165+
this.set_last_error(IoError::Raw(Scalar::from_i32(0)))?;
165166

166167
let file_name = this.read_path_from_wide_str(this.read_pointer(file_name)?)?;
167168
let mut desired_access = this.read_scalar(desired_access)?.to_u32()?;

0 commit comments

Comments
 (0)