Skip to content

Commit

Permalink
Merge pull request libevent#289 from mc-server/UnicodeErrMsgFix
Browse files Browse the repository at this point in the history
Fixed Unicode issue in error messages.
  • Loading branch information
Mark Ellzey committed Dec 14, 2015
2 parents 809bb39 + e8b7895 commit 3e2c10a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evutil.c
Expand Up @@ -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;
Expand Down

0 comments on commit 3e2c10a

Please sign in to comment.