Skip to content

Commit 8293d80

Browse files
committed
Set explicit return value size for windows shim
1 parent e1a1592 commit 8293d80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/foreign_items/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
236236
"TryEnterCriticalSection" if this.frame().instance.to_string().starts_with("std::sys::windows::")
237237
=> {
238238
// There is only one thread, so this always succeeds and returns TRUE
239-
this.write_scalar(Scalar::from_int(1, dest.layout.size), dest)?;
239+
this.write_scalar(Scalar::from_i32(1), dest)?;
240240
}
241241

242242
_ => throw_unsup_format!("can't call foreign function: {}", link_name),

0 commit comments

Comments
 (0)