From 8548ffe6b5c062490f4aa8c3457923542c8498d1 Mon Sep 17 00:00:00 2001 From: Michal Malik Date: Wed, 23 Dec 2015 00:19:34 +0100 Subject: [PATCH] fix #337 https://github.com/unicorn-engine/unicorn/issues/337 --- hook.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hook.c b/hook.c index d755f45c..6e575d83 100644 --- a/hook.c +++ b/hook.c @@ -143,6 +143,10 @@ uc_err hook_del(struct uc_struct *uc, uc_hook hh) if (hh == uc->hook_in_idx) { uc->hook_in_idx = 0; } + + if(hh == uc->hook_syscall_idx) { + uc->hook_syscall_idx = 0; + } uc->hook_callbacks[hh].callback = NULL; uc->hook_callbacks[hh].user_data = NULL;