Skip to contentSkip to conversation

vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

PATCH New Sven Strickroth 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

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

---
 compat/snprintf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
compat/snprintf.c +1 -1
index 42ea1ac..0b11688 100644
@@ -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
Signature · 3 lines
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server