xcopy: Fix varargs handling for 64-bit.

This commit is contained in:
Alexandre Julliard 2011-10-20 14:31:29 +02:00
parent 5c1c7a6576
commit 6b59b05244
1 changed files with 4 additions and 4 deletions

View File

@ -93,7 +93,7 @@ static WCHAR *XCOPY_LoadMessage(UINT id) {
* and hence required WriteConsoleW to output it, however if file i/o is
* redirected, it needs to be WriteFile'd using OEM (not ANSI) format
* ========================================================================= */
static int XCOPY_wprintf(const WCHAR *format, ...) {
static int __cdecl XCOPY_wprintf(const WCHAR *format, ...) {
static WCHAR *output_bufW = NULL;
static char *output_bufA = NULL;
@ -101,7 +101,7 @@ static int XCOPY_wprintf(const WCHAR *format, ...) {
static BOOL traceOutput = FALSE;
#define MAX_WRITECONSOLE_SIZE 65535
va_list parms;
__ms_va_list parms;
DWORD nOut;
int len;
DWORD res = 0;
@ -119,11 +119,11 @@ static int XCOPY_wprintf(const WCHAR *format, ...) {
return 0;
}
va_start(parms, 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);
va_end(parms);
__ms_va_end(parms);
if (len == 0 && GetLastError() != NO_ERROR) {
WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(format));
return 0;