Handle case where llOwnerSay() doesn't contain a > or a blank properly.

Tonya Souther 2012-06-21 21:25:06 -05:00
parent e7433bb935
commit 95e4d95cdb
1 changed files with 6 additions and 1 deletions

View File

@ -138,7 +138,12 @@ bool FSLSLBridge :: lslToViewer(std::string message, LLUUID fromID, LLUUID owner
return false; // quick exit if no leading <
S32 closebracket = message.find('>');
S32 firstblank = message.find(' ');
S32 tagend = (closebracket < firstblank) ? closebracket : firstblank;
S32 tagend;
if (closebracket == std::string::npos)
tagend = firstblank;
else if (firstblank == std::string::npos)
tagend = closebracket;
else tagend = (closebracket < firstblank) ? closebracket : firstblank;
if (tagend == std::string::npos)
return false;
std::string tag = message.substr(0,tagend+1);