From 60befdb36e70ff5d831c2bfe7d4d19d932f250b3 Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Mon, 14 Mar 2016 15:12:56 -0500 Subject: [PATCH] VS2013 snprintf compatibility --- Win32/Win32App.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Win32/Win32App.cpp b/Win32/Win32App.cpp index 269cc1ce..985d9eec 100644 --- a/Win32/Win32App.cpp +++ b/Win32/Win32App.cpp @@ -4,6 +4,11 @@ #include "../Config.h" #include "resource.h" #include "Win32App.h" +#include + +#if defined(_MSC_VER) && _MSC_VER < 1900 +#define snprintf _snprintf +#endif #define ID_ABOUT 2000 #define ID_EXIT 2001 @@ -98,7 +103,7 @@ namespace win32 char buf[30]; std::string httpAddr; i2p::config::GetOption("http.address", httpAddr); uint16_t httpPort; i2p::config::GetOption("http.port", httpPort); - std::snprintf(buf, 30, "http://%s:%d", httpAddr.c_str(), httpPort); + snprintf(buf, 30, "http://%s:%d", httpAddr.c_str(), httpPort); ShellExecute(NULL, "open", buf, NULL, NULL, SW_SHOWNORMAL); return 0; }