From af1eaac79d76dd1ba0017b21cab4b155eb7a7ba1 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 12 Jun 2013 14:55:46 +0200 Subject: [PATCH] Bug fix. Revert an incorrect change made in c5fc945f33e441705d8518077468184dda6b3599 (imported from viewer 3). This stops ASSERT(mSegments.back()->getEnd() == getLength()) in LLTextEditor::loadKeywords. --- indra/llui/llkeywords.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 972209859..e3a2795fb 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -367,7 +367,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW return; } - S32 text_len = wtext.size() + 1; + S32 text_len = wtext.size(); seg_list->push_back( new LLTextSegment( LLColor3(defaultColor), 0, text_len ) ); @@ -584,6 +584,7 @@ void LLKeywords::insertSegment(std::vector& seg_list, LLTextSe { LLTextSegmentPtr last = seg_list.back(); S32 new_seg_end = new_segment->getEnd(); + llassert(new_seg_end <= text_len); if( new_segment->getStart() == last->getStart() ) {