mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-01-19 08:52:34 +01:00
Fixed wrong this pointer on destruction of forcedbyref params (this ptr was eip!)
--HG-- branch : hookman_autogen extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/branches/hookman_autogen%40572
This commit is contained in:
parent
a0cbabed06
commit
12cb5ea79a
@ -390,9 +390,12 @@ namespace SourceHook
|
||||
if (pi.type == PassInfo::PassType_Object && (pi.flags & PassInfo::PassFlag_ODtor) &&
|
||||
(pi.flags & PassInfo::PassFlag_ByVal) && (pi.flags & PassFlag_ForcedByRef))
|
||||
{
|
||||
// Actually, this is only for GCC (see line above: ForcedByRef)
|
||||
IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, fbrr_base + GetForcedByRefParamOffset(i));
|
||||
IA32_Push_Reg(&m_HookFunc, REG_ECX);
|
||||
IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(pi.pDtor));
|
||||
IA32_Call_Reg(&m_HookFunc, REG_EAX);
|
||||
IA32_Pop_Reg(&m_HookFunc, REG_ECX);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user