From f61367811547ca2a19567f35afeb6ddd320d7652 Mon Sep 17 00:00:00 2001 From: Thierry Date: Tue, 6 Nov 2018 17:35:35 -0500 Subject: [PATCH] fix: Call DetourBarrierThreadDetach for thread detach instead of thread attach --- dll/corehook/corehook.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/corehook/corehook.cpp b/dll/corehook/corehook.cpp index cd8c2c4..01be65d 100644 --- a/dll/corehook/corehook.cpp +++ b/dll/corehook/corehook.cpp @@ -17,7 +17,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD dwReason, LPVOID reserved) DetourCriticalInitialize(); } - else if (dwReason == DLL_THREAD_ATTACH) { + else if (dwReason == DLL_THREAD_DETACH) { DetourBarrierThreadDetach(); } else if (dwReason == DLL_PROCESS_DETACH) {