summaryrefslogtreecommitdiff
path: root/compat/snprintf.c
diff options
context:
space:
mode:
authorSven Strickroth <sven@cs-ware.de>2016-03-29 16:25:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-30 18:13:01 (GMT)
commitdae26d30f4dfff352fb401e5a24c2df1a0a339f0 (patch)
treec1f8bd527931156a4919e2fd4a9e2226f0472f9d /compat/snprintf.c
parent90f7b16b3adc78d4bbabbd426fb69aa78c714f71 (diff)
downloadgit-dae26d30f4dfff352fb401e5a24c2df1a0a339f0.zip
git-dae26d30f4dfff352fb401e5a24c2df1a0a339f0.tar.gz
git-dae26d30f4dfff352fb401e5a24c2df1a0a339f0.tar.bz2
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 <sven@cs-ware.de> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Acked-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/snprintf.c')
-rw-r--r--compat/snprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/snprintf.c b/compat/snprintf.c
index 42ea1ac..0b11688 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