Merge pull request #168 from lunixbochs/master

fix #165
This commit is contained in:
Nguyen Anh Quynh 2015-10-06 14:33:56 +08:00
commit 5b24c24e82

3
hook.c
View file

@ -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;