From a2f7e37d8adf2047e1f3b0ea1227ac9d51514783 Mon Sep 17 00:00:00 2001 From: Matthew Wozniak Date: Fri, 1 Nov 2024 13:47:31 -0400 Subject: play demo using the demoplayer object --- hook.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hook.c') diff --git a/hook.c b/hook.c index 8d7f409..fe8c555 100644 --- a/hook.c +++ b/hook.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: ISC // SPDX-FileCopyrightText: 2024 Michael Smith -// SPDX-FileCopyrightText: 2022 Willian Henrique // +// SPDX-FileCopyrightText: 2022 Willian Henrique // SPDX-FileCopyrightText: 2024 Matthew Wozniak #include @@ -70,7 +70,7 @@ void *hook_inline(void *func_, void *target) { } } // for simplicity, just bump alloc the trampoline. no need to free anyway - if (nexttrampoline - trampolines > sizeof(trampolines) - len - 6) { + if (nexttrampoline - trampolines > (int)sizeof(trampolines) - len - 6) { warn("out of trampoline space\n"); return 0; } @@ -99,6 +99,7 @@ void unhook_inline(void *orig) { void *hook_dllapi(const char *module, const char *name, void *target) { void *func = os_dlsym(os_dlopen(module), name); + debug("%s = %p", name, func); if (!func) warn("couldn't find function %s in %s", name, module); else return hook_inline(func, target); return NULL; -- cgit v1.2.3-54-g00ecf