PHOE-3637: Fixed crash when saving a notecard opened from a prim

Tue, 06 Mar 2012 20:29:50 -0800

author
Kadah_Coba <kadah.coba@gmail.com>
date
Tue, 06 Mar 2012 20:29:50 -0800
changeset 1666
e55f036c87e0
parent 1665
35bd4c2173eb
child 1667
09d9a428c141

PHOE-3637: Fixed crash when saving a notecard opened from a prim

indra/llui/lltexteditor.cpp file | annotate | diff | revisions
     1.1 --- a/indra/llui/lltexteditor.cpp	Tue Mar 06 20:08:03 2012 -0800
     1.2 +++ b/indra/llui/lltexteditor.cpp	Tue Mar 06 20:29:50 2012 -0800
     1.3 @@ -953,7 +953,9 @@
     1.4  	S32 segoffset = mLineStartList[line].mOffset;
     1.5  	LLTextSegment* seg = mSegments[segidx];
     1.6  	S32 res = seg->getStart() + segoffset;
     1.7 -	if (res > seg->getEnd()) llerrs << "wtf" << llendl;
     1.8 +    //KC- instead of crashing, just clamp the value. (Might not be the right solution)
     1.9 +	//if (res > seg->getEnd()) llerrs << "wtf" << llendl;
    1.10 +    res = llclamp(res, 0, seg->getEnd());
    1.11  	return res;
    1.12  }
    1.13  

mercurial