Commit 536277ad authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 16c93e97
......@@ -122,11 +122,10 @@ static int WINAPIV XCOPY_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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment