Fixed Unicode issue in error messages.

This commit is contained in:
Mattes D 2015-10-09 19:41:30 +02:00
parent 809bb39b2b
commit e8b78957ea

View File

@ -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;