From 6a6c0cd5f0f2e7283f2271f2188280e5ce9b9e69 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 21 Apr 2019 13:25:24 +0200 Subject: [PATCH] implement ExitProcess for Windows --- src/fn_call.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fn_call.rs b/src/fn_call.rs index 2f827510aa5d..84033e9e8307 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -78,6 +78,10 @@ fn emulate_foreign_item( let code = this.read_scalar(args[0])?.to_i32()?; return err!(Exit(code)); } + "ExitProcess" => { + let code = this.read_scalar(args[0])?.to_u32()?; + return err!(Exit(code as i32)); + } _ => if dest.is_none() { return err!(Unimplemented( format!("can't call diverging foreign function: {}", link_name),