]> granicus.if.org Git - libevent/commitdiff
Fixed Unicode issue in error messages.
authorMattes D <github@xoft.cz>
Fri, 9 Oct 2015 17:41:30 +0000 (19:41 +0200)
committerMattes D <github@xoft.cz>
Mon, 14 Dec 2015 10:51:35 +0000 (11:51 +0100)
evutil.c

index f9cbaa7d63356d89917e9da7a0871803a14f9a47..573c0acdf7fcc3180466f704d20f5a4b2d0509ae 100644 (file)
--- a/evutil.c
+++ b/evutil.c
@@ -1708,10 +1708,10 @@ evutil_socket_error_to_string(int errcode)
                goto done;
        }
 
-       if (0 != FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+       if (0 != FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
                               FORMAT_MESSAGE_IGNORE_INSERTS |
                               FORMAT_MESSAGE_ALLOCATE_BUFFER,
-                              NULL, errcode, 0, (LPTSTR)&msg, 0, NULL))
+                              NULL, errcode, 0, (char *)&msg, 0, NULL))
                chomp (msg);    /* because message has trailing newline */
        else {
                size_t len = 50;