From d8589613444ddff3d616e02141344dfb65f2fbec Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 9 Mar 2022 16:11:47 +0100 Subject: [PATCH] dlerror Win compat: use FormatMessageA explicitly With current flags, -DUNICODE is defined, thus compiling preview.cpp using wide function (FormatMessageW) implicitly, thus use FormatMessageA explicitly. --- src/lib_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_common.h b/src/lib_common.h index c3018286cd..b3520d5363 100644 --- a/src/lib_common.h +++ b/src/lib_common.h @@ -55,7 +55,7 @@ static char *dlerror(void) ATTRIBUTE(unused); static char *dlerror(void) { thread_local static char buf[1024] = "(unknown)"; - FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, // flags + FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, // flags NULL, // lpsource GetLastError(), // message id MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), // languageid