diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index ec8929dea9b..e69b45a6efb 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -201,7 +201,10 @@ int _vsnwprintf(WCHAR *str, unsigned int len, { *fmta++ = *iter; *fmta = '\0'; - sprintf(bufaiter, fmtbufa, va_arg(valist, void *)); + if (*iter == (WCHAR)L'f') + sprintf(bufaiter, fmtbufa, va_arg(valist, double)); + else + sprintf(bufaiter, fmtbufa, va_arg(valist, void *)); } while (*bufaiter) { diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c index 3effaba775a..50d2dbf3dfc 100644 --- a/dlls/ntdll/wcstring.c +++ b/dlls/ntdll/wcstring.c @@ -444,7 +444,10 @@ static int __cdecl NTDLL_vsnwprintf(WCHAR *str, unsigned int len, { *fmta++ = *iter; *fmta = '\0'; - sprintf(bufaiter, fmtbufa, va_arg(valist, void *)); + if (*iter == (WCHAR)L'f') + sprintf(bufaiter, fmtbufa, va_arg(valist, double)); + else + sprintf(bufaiter, fmtbufa, va_arg(valist, void *)); } while (*bufaiter) {