From e6b07f4f6576c1aa3a5ad5451e93674f70848666 Mon Sep 17 00:00:00 2001 From: Ryan Hileman Date: Mon, 5 Oct 2015 23:30:54 -0700 Subject: [PATCH] fix #165 --- hook.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hook.c b/hook.c index dbc61a78..d755f45c 100644 --- a/hook.c +++ b/hook.c @@ -27,8 +27,7 @@ size_t hook_find_new(struct uc_struct *uc) return 0; // reset the newly added slots - memset(new + uc->hook_size * sizeof(uc->hook_callbacks[0]), 0, - HOOK_SIZE * sizeof(uc->hook_callbacks[0])); + memset(new + uc->hook_size, 0, HOOK_SIZE * sizeof(uc->hook_callbacks[0])); uc->hook_callbacks = new; uc->hook_size += HOOK_SIZE;