Skip to content

Commit dae26d3

Browse files
Sven Strickrothgitster
authored andcommitted
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 <[email protected]> Acked-by: Johannes Schindelin <[email protected]> Acked-by: Sebastian Schuberth <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 90f7b16 commit dae26d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/snprintf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* always have room for a trailing NUL byte.
1010
*/
1111
#ifndef SNPRINTF_SIZE_CORR
12-
#if defined(WIN32) && (!defined(__GNUC__) || __GNUC__ < 4)
12+
#if defined(WIN32) && (!defined(__GNUC__) || __GNUC__ < 4) && (!defined(_MSC_VER) || _MSC_VER < 1900)
1313
#define SNPRINTF_SIZE_CORR 1
1414
#else
1515
#define SNPRINTF_SIZE_CORR 0

0 commit comments

Comments
 (0)