From 160654be6346c7af036b19a9630b2fe7d73a222d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 13 May 2020 22:05:53 +0200 Subject: [PATCH] attrib: FormatMessage() now reports ERROR_NO_WORK_DONE error for empty string. Signed-off-by: Alexandre Julliard --- programs/attrib/attrib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c index e7fe4687376..558a393253c 100644 --- a/programs/attrib/attrib.c +++ b/programs/attrib/attrib.c @@ -74,11 +74,10 @@ static int WINAPIV ATTRIB_wprintf(const WCHAR *format, ...) } __ms_va_start(parms, format); - SetLastError(NO_ERROR); len = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, output_bufW, MAX_WRITECONSOLE_SIZE/sizeof(*output_bufW), &parms); __ms_va_end(parms); - 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(format)); return 0; }