summaryrefslogtreecommitdiffhomepage
path: root/src/hook.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hook.c')
-rw-r--r--src/hook.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hook.c b/src/hook.c
index eb64cbe..9a6e885 100644
--- a/src/hook.c
+++ b/src/hook.c
@@ -60,7 +60,7 @@ void *hook_inline(void *func_, void *target) {
// dumb hack: if we hit some thunk that immediately jumps elsewhere (which
// seems common for win32 API functions), hook the underlying thing instead.
while (*func == X86_JMPIW) func += mem_loads32(func + 1) + 5;
- if (!os_mprot(func, 5, PAGE_EXECUTE_READWRITE)) return false;
+ if (!os_mprot(func, 5, PAGE_EXECUTE_READWRITE)) return 0;
int len = 0;
for (;;) {
// FIXME: these cases may result in somewhat dodgy error messaging. They