diff options
Diffstat (limited to 'indra/llcommon')
| -rw-r--r-- | indra/llcommon/lluriparser.cpp | 11 | ||||
| -rw-r--r-- | indra/llcommon/lluriparser.h | 2 | 
2 files changed, 8 insertions, 5 deletions
| diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp index ef4481d32f..0ff6657b87 100644 --- a/indra/llcommon/lluriparser.cpp +++ b/indra/llcommon/lluriparser.cpp @@ -118,11 +118,14 @@ void LLUriParser::fragment(const std::string& s)  void LLUriParser::textRangeToString(UriTextRangeA& textRange, std::string& str)  { -	S32 len = textRange.afterLast - textRange.first; -	if (len) +	if (textRange.first != NULL && textRange.afterLast != NULL && textRange.first < textRange.afterLast)  	{ -		str = textRange.first; -		str = str.substr(0, len); +		const ptrdiff_t len = textRange.afterLast - textRange.first; +		str.assign(textRange.first, static_cast<std::string::size_type>(len)); +	} +	else +	{ +		str = LLStringUtil::null;  	}  } diff --git a/indra/llcommon/lluriparser.h b/indra/llcommon/lluriparser.h index 719f916837..3e7a5c2a57 100644 --- a/indra/llcommon/lluriparser.h +++ b/indra/llcommon/lluriparser.h @@ -36,7 +36,7 @@ class LL_COMMON_API LLUriParser  {  public:  	LLUriParser(const std::string& u); -	virtual ~LLUriParser(); +	~LLUriParser();  	const char * scheme() const;  	void sheme (const std::string& s); | 
