From 3510499a9e523e51b1d8015f7d393aea9b68f679 Mon Sep 17 00:00:00 2001 From: omtinez Date: Thu, 29 Oct 2015 19:17:19 -0700 Subject: [PATCH] windows: Call _set_output_format() only on Visual Studio versions 2013 or lower. Since VS2015, float formatting is C standard compliant by default: https://msdn.microsoft.com/en-us/library/bb531344(v=vs.140).aspx --- windows/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/windows/init.c b/windows/init.c index 743814d604..5e96af046e 100644 --- a/windows/init.c +++ b/windows/init.c @@ -32,7 +32,9 @@ void init() { init_sleep(); #ifdef __MINGW32__ putenv("PRINTF_EXPONENT_DIGITS=2"); -#else +#elif _MSC_VER < 1900 + // This is only necessary for Visual Studio versions 2013 and below: + // https://msdn.microsoft.com/en-us/library/bb531344(v=vs.140).aspx _set_output_format(_TWO_DIGIT_EXPONENT); #endif }