public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sven Strickroth <sven@cs-ware•de>
To: Git List <git@vger•kernel.org>, Junio C Hamano <gitster@pobox•com>
Subject: [PATCH] vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more
Date: Fri, 14 Aug 2015 21:39:04 +0200	[thread overview]
Message-ID: <55CE43D8.6000108@cs-ware.de> (raw)

W/o this fix there is one character missing at the end.

Signed-off-by: Sven Strickroth <email@cs-ware•de>
---
 compat/snprintf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server

                 reply	other threads:[~2015-08-14 19:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55CE43D8.6000108@cs-ware.de \
    --to=sven@cs-ware$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox