Alexandre Julliard : xcopy: FormatMessage() now reports ERROR_NO_WORK_DONE error for empty string.
Alexandre Julliard
julliard at winehq.org
Wed May 13 16:29:54 CDT 2020
Module: wine
Branch: master
Commit: 536277adf5fbb28576187db3b2b45fcb6ce72bd8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=536277adf5fbb28576187db3b2b45fcb6ce72bd8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed May 13 22:07:16 2020 +0200
xcopy: FormatMessage() now reports ERROR_NO_WORK_DONE error for empty string.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/xcopy/xcopy.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c
index f50bb7791c..a8614f979a 100644
--- a/programs/xcopy/xcopy.c
+++ b/programs/xcopy/xcopy.c
@@ -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;
}
More information about the wine-cvs
mailing list