From e188fda25f5b628b4c45de31c3d10a0bdf01bd28 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Mon, 16 Apr 2001 19:00:42 +0000 Subject: [PATCH] Handle the %f case in wsprintf. --- dlls/msvcrt/wcs.c | 5 ++++- dlls/ntdll/wcstring.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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) {