Defer to real GetProcAddress for NULL parameters. Closes #1476

* Returning NULL as the result is not necessarily correct - a NULL module is an
  alias for the executable itself.
This commit is contained in:
baldurk
2019-07-30 16:51:49 +01:00
parent f8be2a4fd1
commit 7ad303f6ad
+1 -4
View File
@@ -703,10 +703,7 @@ static bool OrdinalAsString(void *func)
FARPROC WINAPI Hooked_GetProcAddress(HMODULE mod, LPCSTR func)
{
if(mod == NULL || func == NULL)
return (FARPROC)NULL;
if(mod == s_HookData->ownmodule)
if(mod == NULL || func == NULL || mod == s_HookData->ownmodule)
return GetProcAddress(mod, func);
#if ENABLED(VERBOSE_DEBUG_HOOK)