Fix passing this pointer to callback even if the detour was setup to ignore it
The this pointer was always passed to the plugin callback if the calling convention was a thiscall. Even if the plugin author set the this pointer type to ThisPointer_Ignore.
This commit is contained in:
		
							parent
							
								
									02e0545d75
								
							
						
					
					
						commit
						2ba221b6a3
					
				| @ -277,7 +277,7 @@ ReturnAction_t HandleDetour(HookType_t hookType, CHook* pDetour) | |||||||
| 		ke::AutoPtr<void> tempRetBuf(new uint8_t[pDetour->m_pCallingConvention->m_returnType.size]); | 		ke::AutoPtr<void> tempRetBuf(new uint8_t[pDetour->m_pCallingConvention->m_returnType.size]); | ||||||
| 
 | 
 | ||||||
| 		// Find the this pointer.
 | 		// Find the this pointer.
 | ||||||
| 		if (pWrapper->callConv == CallConv_THISCALL) | 		if (pWrapper->callConv == CallConv_THISCALL && pWrapper->thisType != ThisPointer_Ignore) | ||||||
| 		{ | 		{ | ||||||
| 			void *thisPtr = pDetour->GetArgument<void *>(0); | 			void *thisPtr = pDetour->GetArgument<void *>(0); | ||||||
| 			cell_t thisAddr = GetThisPtr(thisPtr, pWrapper->thisType); | 			cell_t thisAddr = GetThisPtr(thisPtr, pWrapper->thisType); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user