From 8612720108312b33982c431f88a1acae5a24ee48 Mon Sep 17 00:00:00 2001 From: bottiger1 <55270538+bottiger1@users.noreply.github.com> Date: Wed, 8 May 2024 20:46:52 -0700 Subject: [PATCH] remove other 32bit-isms from sdktools --- extensions/sdktools/hooks.cpp | 2 +- extensions/sdktools/vhelpers.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/sdktools/hooks.cpp b/extensions/sdktools/hooks.cpp index 83588c99fa..c758575314 100644 --- a/extensions/sdktools/hooks.cpp +++ b/extensions/sdktools/hooks.cpp @@ -584,7 +584,7 @@ bool CHookManager::SendFile(const char *filename, unsigned int transferID) #if !defined CLIENTVOICE_HOOK_SUPPORT bool CHookManager::ProcessVoiceData(CLC_VoiceData *msg) { - IClient *pClient = (IClient *)((intptr_t)(META_IFACEPTR(IClient)) - 4); + IClient *pClient = (IClient *)((intptr_t)(META_IFACEPTR(IClient)) - sizeof(intptr_t)); if (pClient == NULL) { return true; diff --git a/extensions/sdktools/vhelpers.cpp b/extensions/sdktools/vhelpers.cpp index 7d5c5545d0..ceeaa76ae5 100644 --- a/extensions/sdktools/vhelpers.cpp +++ b/extensions/sdktools/vhelpers.cpp @@ -754,7 +754,7 @@ CEntityFactoryDictionary *GetEntityFactoryDictionary() // Get real address of function // Address of signature + offset of relative offset + sizeof(int32_t) offset + relative offset - addr = (void *)((intptr_t)addr + offset + 4 + funcOffset); + addr = (void *)((intptr_t)addr + offset + sizeof(intptr_t) + funcOffset); } pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retData, NULL, 0);