diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index b135a169e5a..e4f29a1f350 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -158,7 +158,7 @@ void WCMD_output (const WCHAR *format, ...) { int ret; va_start(ap,format); - ret = wvsprintf (string, format, ap); + ret = vsnprintfW(string, sizeof(string)/sizeof(WCHAR), format, ap); if( ret >= (sizeof(string)/sizeof(WCHAR))) { WINE_ERR("Output truncated in WCMD_output\n" ); ret = (sizeof(string)/sizeof(WCHAR)) - 1;