mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Fixed Unicode issue in error messages.
This commit is contained in:
parent
809bb39b2b
commit
e8b78957ea
4
evutil.c
4
evutil.c
@ -1708,10 +1708,10 @@ evutil_socket_error_to_string(int errcode)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 != FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
|
if (0 != FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
|
||||||
FORMAT_MESSAGE_IGNORE_INSERTS |
|
FORMAT_MESSAGE_IGNORE_INSERTS |
|
||||||
FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
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 */
|
chomp (msg); /* because message has trailing newline */
|
||||||
else {
|
else {
|
||||||
size_t len = 50;
|
size_t len = 50;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user