From 97c39a3a83466481a4a141a470637dc34507b32f Mon Sep 17 00:00:00 2001 From: Sascha Schirra Date: Sun, 27 Mar 2016 20:58:05 +0200 Subject: [PATCH] Bugfix: remove hook_add call if no insn type is given --- bindings/ruby/unicorn_gem/ext/unicorn.c | 1 - 1 file changed, 1 deletion(-) diff --git a/bindings/ruby/unicorn_gem/ext/unicorn.c b/bindings/ruby/unicorn_gem/ext/unicorn.c index 8681d4ae..c7979343 100644 --- a/bindings/ruby/unicorn_gem/ext/unicorn.c +++ b/bindings/ruby/unicorn_gem/ext/unicorn.c @@ -367,7 +367,6 @@ VALUE m_uc_hook_add(int argc, VALUE* argv, VALUE self){ err = uc_hook_add(_uc, &trace, htype, cb_hook_insn_syscall,(void *)passthrough, NUM2ULL(begin), NUM2ULL(end), NUM2INT(arg1)); break; } - err = uc_hook_add(_uc, &trace, htype, cb_hook_intr,(void *)passthrough, NUM2ULL(begin), NUM2ULL(end)); } else if(htype == UC_HOOK_INTR){ err = uc_hook_add(_uc, &trace, htype, cb_hook_intr,(void *)passthrough, NUM2ULL(begin), NUM2ULL(end));