This allows to get msvcrt module also on non-NT systems, on which
GetModuleHandleW() always returns NULL.
---
 mingw-w64-crt/include/msvcrt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-crt/include/msvcrt.h b/mingw-w64-crt/include/msvcrt.h
index de708c60b528..348a8562e82d 100644
--- a/mingw-w64-crt/include/msvcrt.h
+++ b/mingw-w64-crt/include/msvcrt.h
@@ -9,7 +9,7 @@
 
 static inline HANDLE __mingw_get_msvcrt_handle(void)
 {
-    return GetModuleHandleW(L"msvcrt.dll");
+    return GetModuleHandleA("msvcrt.dll");
 }
 
 #endif
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to