summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rw-r--r--indra/llcommon/llstring.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index a688bc1c6f..59d71a8e8e 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -804,16 +804,19 @@ std::string utf8str_removeCRLF(const std::string& utf8str)
#if LL_WINDOWS
// documentation moved to header. Phoenix 2007-11-27
-int safe_snprintf(char *str, size_t size, const char *format, ...)
+namespace snprintf_hack
{
- va_list args;
- va_start(args, format);
-
- int num_written = _vsnprintf(str, size, format, args); /* Flawfinder: ignore */
- va_end(args);
-
- str[size-1] = '\0'; // always null terminate
- return num_written;
+ int snprintf(char *str, size_t size, const char *format, ...)
+ {
+ va_list args;
+ va_start(args, format);
+
+ int num_written = _vsnprintf(str, size, format, args); /* Flawfinder: ignore */
+ va_end(args);
+
+ str[size-1] = '\0'; // always null terminate
+ return num_written;
+ }
}
std::string ll_convert_wide_to_string(const wchar_t* in)