[PATCH] Use the custom vsnprintf implementation for msvcrt.vsprintf too

Sam Dennis samuel.howard.dennis at gmail.com
Mon Nov 13 09:02:33 CST 2006


vsprintf was missed in the changes to msvcrt.*printf, making it use
the same implementation closes bug 4696 and probably a couple of
others.

 dlls/msvcrt/msvcrt.spec |    2 +-
 dlls/msvcrt/wcs.c       |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index dc78679..eaf9312 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -738,7 +738,7 @@ # extern _pwctype
 @ cdecl vfprintf(ptr str long) MSVCRT_vfprintf
 @ cdecl vfwprintf(ptr wstr long) MSVCRT_vfwprintf
 @ cdecl vprintf(str long) MSVCRT_vprintf
-@ cdecl vsprintf(ptr str ptr) ntdll.vsprintf
+@ cdecl vsprintf(ptr str ptr) MSVCRT_vsprintf
 @ cdecl vswprintf(ptr wstr long) MSVCRT_vswprintf
 @ cdecl vwprintf(wstr long) MSVCRT_vwprintf
 @ cdecl wcscat(wstr wstr) ntdll.wcscat
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index a7a014d..ee2174e 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -735,6 +735,14 @@ int CDECL MSVCRT_vsnprintf( char *str, u
 }

 /*********************************************************************
+ *		vsprintf (MSVCRT.@)
+ */
+int CDECL MSVCRT_vsprintf( char *str, const char *format, va_list valist)
+{
+    return MSVCRT_vsnprintf(str, INT_MAX, format, valist);
+}
+
+/*********************************************************************
  *		_snprintf (MSVCRT.@)
  */
 int CDECL MSVCRT__snprintf(char *str, unsigned int len, const char
*format, ...)
-- 
1.4.1.1



More information about the wine-patches mailing list