Skip to content

Commit

Permalink
MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR…
Browse files Browse the repository at this point in the history
… 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]>
  • Loading branch information
Sven Strickroth authored and gitster committed Mar 30, 2016
1 parent 90f7b16 commit dae26d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compat/snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dae26d3

Please sign in to comment.