From ddbf2ffd1d01a6250ec59b2a76ae25c5f6e7941d Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Thu, 19 Nov 2015 18:09:57 -0300 Subject: fix compile error in some msvc version (snprintf not found) --- core/ustring.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/ustring.cpp b/core/ustring.cpp index 2dffdf066c..72ad2a15e7 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -44,6 +44,11 @@ #include #include #endif + +#if defined(MINGW_ENABLED) || defined(_MSC_VER) +#define snprintf _snprintf +#endif + /** STRING **/ const char *CharString::get_data() const { @@ -3091,7 +3096,7 @@ String String::http_escape() const { res += ord; } else { char h_Val[3]; - snprintf(h_Val, 3, "%.2X", ord); + _snprintf(h_Val, 3, "%.2X", ord); res += "%"; res += h_Val; } -- cgit v1.2.3