From e10d83c8bb3436398ef47183e15d4ab3a2036547 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 14 Aug 2018 18:44:31 +0200 Subject: [PATCH] fix windows hooks --- src/fn_call.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fn_call.rs b/src/fn_call.rs index 11b0ae345c7f..b475837a6e52 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -634,14 +634,16 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, ' let ptr_size = self.memory.pointer_size(); self.write_scalar(dest, Scalar::from_int(1, ptr_size), dest_ty)?; }, - "GetModuleHandleW" | - "GetProcAddress" | "InitializeCriticalSection" | "EnterCriticalSection" | - "TryEnterCriticalSection" | "LeaveCriticalSection" | "DeleteCriticalSection" | "SetLastError" => { + // Function does not return anything, nothing to do + }, + "GetModuleHandleW" | + "GetProcAddress" | + "TryEnterCriticalSection" => { // pretend these do not exist/nothing happened, by returning zero let ptr_size = self.memory.pointer_size(); self.write_scalar(dest, Scalar::from_int(0, ptr_size), dest_ty)?;