commit | 9dbf6ba8a76701f36bb6ce3fa682316c7bbcd969 | [log] [tgz] |
---|---|---|
author | Pali Rohár <pali.rohar@gmail.com> | Sat Aug 16 10:41:19 2025 +0200 |
committer | Martin Storsjö <martin@martin.st> | Tue Aug 19 15:54:50 2025 +0300 |
tree | 14125684b931d508b734ff482bb49d59958dfaa3 | |
parent | 3692f3ae0b31c9a252d489dac717d4fc55714c5d [diff] |
crt: dll: Initialize __mingw_app_type only once Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c index 6bee08f..a605c95 100644 --- a/mingw-w64-crt/crt/crtdll.c +++ b/mingw-w64-crt/crt/crtdll.c
@@ -147,7 +147,9 @@ { WINBOOL retcode = TRUE; - __mingw_app_type = 0; + if (dwReason == DLL_PROCESS_ATTACH) + __mingw_app_type = 0; + __native_dllmain_reason = dwReason; if (dwReason == DLL_PROCESS_DETACH && __proc_attached <= 0) {