Safe and probably pointless crash workarounds from FS and LL

This commit is contained in:
Siana Gearz
2012-08-13 06:14:16 +02:00
parent 7335ae548c
commit 6b8c58e3b5
6 changed files with 20 additions and 5 deletions

View File

@@ -53,7 +53,7 @@ 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();
}