Skip to content

Commit 82c26fa

Browse files
committed
fix windows hooks
1 parent 917b9a6 commit 82c26fa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/fn_call.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,14 +634,16 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
634634
let ptr_size = self.memory.pointer_size();
635635
self.write_scalar(dest, Scalar::from_int(1, ptr_size), dest_ty)?;
636636
},
637-
"GetModuleHandleW" |
638-
"GetProcAddress" |
639637
"InitializeCriticalSection" |
640638
"EnterCriticalSection" |
641-
"TryEnterCriticalSection" |
642639
"LeaveCriticalSection" |
643640
"DeleteCriticalSection" |
644641
"SetLastError" => {
642+
// Function does not return anything, nothing to do
643+
},
644+
"GetModuleHandleW" |
645+
"GetProcAddress" |
646+
"TryEnterCriticalSection" => {
645647
// pretend these do not exist/nothing happened, by returning zero
646648
let ptr_size = self.memory.pointer_size();
647649
self.write_scalar(dest, Scalar::from_int(0, ptr_size), dest_ty)?;

0 commit comments

Comments
 (0)