diff --git a/dynhooks_sourcepawn.cpp b/dynhooks_sourcepawn.cpp index ae0a980..6c73a07 100644 --- a/dynhooks_sourcepawn.cpp +++ b/dynhooks_sourcepawn.cpp @@ -599,8 +599,9 @@ HookParamsStruct *CDynamicHooksSourcePawn::GetParamStruct() continue; int size = argTypes[i].size; + void *paramAddr = (void *)((intptr_t)params->orgParams + offset); void *regAddr = callingConvention->GetArgumentPtr(i + firstArg, m_pDetour->m_pRegisters); - memcpy(params->orgParams + offset, regAddr, size); + memcpy(paramAddr, regAddr, size); offset += size; }