From 2984901f6288d95cfab68770777dbdc17a56b87d Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Wed, 23 Dec 2015 01:45:29 +0800 Subject: [PATCH] regress: fix testcase hook_code_add_del.py --- tests/regress/hook_code_add_del.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/regress/hook_code_add_del.py b/tests/regress/hook_code_add_del.py index 8c589e87..ef071ca2 100755 --- a/tests/regress/hook_code_add_del.py +++ b/tests/regress/hook_code_add_del.py @@ -38,8 +38,8 @@ class HookCodeAddDelTest(regress.RegressTest): emu.reg_write(UC_X86_REG_ESP, STACK_ADDRESS + STACK_SIZE) # UC_HOOK_CODE hook will work even after deletion - emu.hook_add(UC_HOOK_CODE, hook_code, None) - emu.hook_del(UC_HOOK_CODE) + i = emu.hook_add(UC_HOOK_CODE, hook_code, None) + emu.hook_del(i) emu.emu_start(EP, EP + len(CODE), count = 3) print("EIP: 0x%x" % emu.reg_read(UC_X86_REG_EIP))