[DHooks] Fix NaN
return when superceding pre-detour (#1967)
* Update hook.cpp * Update hook.cpp
This commit is contained in:
parent
dd1e5997f3
commit
8e0039aaec
@ -160,7 +160,7 @@ ReturnAction_t CHook::HookHandler(HookType_t eHookType)
|
||||
{
|
||||
ReturnAction_t lastPreReturnAction = m_LastPreReturnAction.back();
|
||||
m_LastPreReturnAction.pop_back();
|
||||
if (lastPreReturnAction == ReturnAction_Override)
|
||||
if (lastPreReturnAction >= ReturnAction_Override)
|
||||
m_pCallingConvention->RestoreReturnValue(m_pRegisters);
|
||||
if (lastPreReturnAction < ReturnAction_Supercede)
|
||||
m_pCallingConvention->RestoreCallArguments(m_pRegisters);
|
||||
@ -191,7 +191,7 @@ ReturnAction_t CHook::HookHandler(HookType_t eHookType)
|
||||
if (eHookType == HOOKTYPE_PRE)
|
||||
{
|
||||
m_LastPreReturnAction.push_back(returnAction);
|
||||
if (returnAction == ReturnAction_Override)
|
||||
if (returnAction >= ReturnAction_Override)
|
||||
m_pCallingConvention->SaveReturnValue(m_pRegisters);
|
||||
if (returnAction < ReturnAction_Supercede)
|
||||
m_pCallingConvention->SaveCallArguments(m_pRegisters);
|
||||
|
Loading…
Reference in New Issue
Block a user