aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llstring.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp
index 73c80e7..a1f19ad 100644
--- a/linden/indra/llcommon/llstring.cpp
+++ b/linden/indra/llcommon/llstring.cpp
@@ -804,16 +804,19 @@ std::string utf8str_removeCRLF(const std::string& utf8str)
804 804
805#if LL_WINDOWS 805#if LL_WINDOWS
806// documentation moved to header. Phoenix 2007-11-27 806// documentation moved to header. Phoenix 2007-11-27
807int safe_snprintf(char *str, size_t size, const char *format, ...) 807namespace snprintf_hack
808{ 808{
809 va_list args; 809 int snprintf(char *str, size_t size, const char *format, ...)
810 va_start(args, format); 810 {
811 811 va_list args;
812 int num_written = _vsnprintf(str, size, format, args); /* Flawfinder: ignore */ 812 va_start(args, format);
813 va_end(args); 813
814 814 int num_written = _vsnprintf(str, size, format, args); /* Flawfinder: ignore */
815 str[size-1] = '\0'; // always null terminate 815 va_end(args);
816 return num_written; 816
817 str[size-1] = '\0'; // always null terminate
818 return num_written;
819 }
817} 820}
818 821
819std::string ll_convert_wide_to_string(const wchar_t* in) 822std::string ll_convert_wide_to_string(const wchar_t* in)