net: FormatMessage() now reports ERROR_NO_WORK_DONE error for empty string.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-05-13 22:06:46 +02:00
parent 88c34b39ed
commit 972ec1ac20
1 changed files with 1 additions and 2 deletions

View File

@ -59,9 +59,8 @@ static int output_vprintf(const WCHAR* fmt, __ms_va_list va_args)
WCHAR str[8192];
int len;
SetLastError(NO_ERROR);
len = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt, 0, 0, str, ARRAY_SIZE(str), &va_args);
if (len == 0 && GetLastError() != NO_ERROR)
if (len == 0 && GetLastError() != ERROR_NO_WORK_DONE)
WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(fmt));
else
output_write(str, len);