From b6d0a9cdbd58308a8200bbc519cbccf646828211 Mon Sep 17 00:00:00 2001 From: IceNinjaman Date: Wed, 27 Nov 2019 20:24:32 +0100 Subject: [PATCH] wchar.h instead cwchar when compiler is MinGW to prevent weird behavior with vsnwprintf (#277) --- src/discord_register_win.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/discord_register_win.cpp b/src/discord_register_win.cpp index e441318..0b1c4a1 100644 --- a/src/discord_register_win.cpp +++ b/src/discord_register_win.cpp @@ -7,7 +7,6 @@ #define NOIME #include #include -#include #include /** @@ -20,6 +19,7 @@ * The entire function is rewritten */ #ifdef __MINGW32__ +#include /// strsafe.h fixes static HRESULT StringCbPrintfW(LPWSTR pszDest, size_t cbDest, LPCWSTR pszFormat, ...) { @@ -34,6 +34,7 @@ static HRESULT StringCbPrintfW(LPWSTR pszDest, size_t cbDest, LPCWSTR pszFormat, return ret; } #else +#include #include #endif // __MINGW32__