Skip to content

Commit d858961

Browse files
committed
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.
1 parent a9e6e05 commit d858961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static char *dlerror(void) ATTRIBUTE(unused);
5555

5656
static char *dlerror(void) {
5757
thread_local static char buf[1024] = "(unknown)";
58-
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, // flags
58+
FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, // flags
5959
NULL, // lpsource
6060
GetLastError(), // message id
6161
MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), // languageid

0 commit comments

Comments
 (0)