diff options
author | Mattes D <github@xoft.cz> | 2015-10-09 19:41:30 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-12-14 11:51:35 +0100 |
commit | e8b78957ea70bd0d64d1ed5dde2108a05476ac79 (patch) | |
tree | bd4ae788cc5166ede76e13aaace61aa9fcd78ed1 | |
parent | 809bb39b2b7b632c86337877b483520d997cd5db (diff) | |
download | libevent-e8b78957ea70bd0d64d1ed5dde2108a05476ac79.tar.gz |
Fixed Unicode issue in error messages.
-rw-r--r-- | evutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |