Fix assert when the pre-hook was fired, but the post hook was skipped
The post hook would have cleared the esp value from the return address map, but there seems to be a case where the post hook isn't called, but the function gets called with the same esp again. This is probably just masking a different error :(
This commit is contained in:
		
							parent
							
								
									1b9fa3743f
								
							
						
					
					
						commit
						94181be280
					
				| @ -207,7 +207,10 @@ void* __cdecl CHook::GetReturnAddress(void* pESP) | |||||||
| void __cdecl CHook::SetReturnAddress(void* pRetAddr, void* pESP) | void __cdecl CHook::SetReturnAddress(void* pRetAddr, void* pESP) | ||||||
| { | { | ||||||
| 	ReturnAddressMap::Insert i = m_RetAddr.findForAdd(pESP); | 	ReturnAddressMap::Insert i = m_RetAddr.findForAdd(pESP); | ||||||
| 	m_RetAddr.add(i, pESP, pRetAddr); | 	if (i.found()) | ||||||
|  | 		i->value = pRetAddr; | ||||||
|  | 	else | ||||||
|  | 		m_RetAddr.add(i, pESP, pRetAddr); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void* CHook::CreateBridge() | void* CHook::CreateBridge() | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user