From dae26d30f4dfff352fb401e5a24c2df1a0a339f0 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Tue, 29 Mar 2016 18:25:28 +0200 Subject: [PATCH] MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more In MSVC2015 the behavior of vsnprintf was changed. W/o this fix there is one character missing at the end. Signed-off-by: Sven Strickroth Acked-by: Johannes Schindelin Acked-by: Sebastian Schuberth Signed-off-by: Junio C Hamano --- compat/snprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/snprintf.c b/compat/snprintf.c index 42ea1ac11..0b1168853 100644 --- a/compat/snprintf.c +++ b/compat/snprintf.c @@ -9,7 +9,7 @@ * always have room for a trailing NUL byte. */ #ifndef SNPRINTF_SIZE_CORR -#if defined(WIN32) && (!defined(__GNUC__) || __GNUC__ < 4) +#if defined(WIN32) && (!defined(__GNUC__) || __GNUC__ < 4) && (!defined(_MSC_VER) || _MSC_VER < 1900) #define SNPRINTF_SIZE_CORR 1 #else #define SNPRINTF_SIZE_CORR 0