From 25be44b13fe2f13373bff6a9b1a3685fc57e6664 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Sat, 1 Aug 2026 22:35:13 -0400 Subject: [PATCH] fix com proxy crashing on 64bit builds due to failing to properly detect target CPU archetecture --- hook/com-proxy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hook/com-proxy.c b/hook/com-proxy.c index b51084c..4ceb1f0 100644 --- a/hook/com-proxy.c +++ b/hook/com-proxy.c @@ -15,7 +15,7 @@ static HRESULT STDMETHODCALLTYPE com_proxy_query_interface( static ULONG STDMETHODCALLTYPE com_proxy_addref(IUnknown *unk); static ULONG STDMETHODCALLTYPE com_proxy_release(IUnknown *unk); -#ifdef __amd64 +#if _WIN64 || __amd64__ /***** 64-BIT TRAMPOLINE *****/ @@ -34,7 +34,7 @@ static const uint8_t com_proxy_tramp[] = { 0xFF, 0xE0, }; -#else +#elif _WIN32 || __i386__ /***** 32-BIT TRAMPOLINE *****/ @@ -59,6 +59,10 @@ static const uint8_t com_proxy_tramp[] = { 0xFF, 0xE1 }; +#else + +#error "Failed to detect target CPU archetecture in hook/com-proxy.c" + #endif HRESULT com_proxy_wrap(