From: Marius Storm-Olsen Date: Fri, 21 Aug 2009 13:30:35 GMT Subject: [PATCH 03/14] Define SNPRINTF_SIZE_CORR=1 for Microsoft Visual C++ Message-ID: In-Reply-To: From: Frank Li The Microsoft C runtime's vsnprintf function does not add NUL at the end of the buffer. Signed-off-by: Frank Li Signed-off-by: Marius Storm-Olsen --- compat/snprintf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/compat/snprintf.c b/compat/snprintf.c index 6c0fb05..37b1edf 100644 --- a/compat/snprintf.c +++ b/compat/snprintf.c @@ -6,7 +6,7 @@ * number of characters to write without the trailing NUL. */ #ifndef SNPRINTF_SIZE_CORR -#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ < 4 +#if (defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ < 4) || defined(_MSC_VER) #define SNPRINTF_SIZE_CORR 1 #else #define SNPRINTF_SIZE_CORR 0 -- 1.6.3.msysgit.0.18.gef407