summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-03-22 18:08:49 -0400
committerOz Linden <oz@lindenlab.com>2013-03-22 18:08:49 -0400
commit1057caffaf24790be26376b2794059e7635dde7b (patch)
tree6f207f916bcf9430ffd0e863600dca642ec799c7 /indra/llcommon/llstring.cpp
parent7632861fc40ffd05b6a1704f629a38250600c294 (diff)
parente15b7bafbb7168a721ffd286c1d1f4e6299abb44 (diff)
merge changes for latest snowstorm project viewer
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rw-r--r--indra/llcommon/llstring.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index fa0eb9f72c..0c32679744 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -47,7 +47,8 @@ std::string ll_safe_string(const char* in)
std::string ll_safe_string(const char* in, S32 maxlen)
{
- if(in) return std::string(in, maxlen);
+ if(in && maxlen > 0 ) return std::string(in, maxlen);
+
return std::string();
}