From dc88effc24e533bd96c5e88de07720b347689f14 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 23 Nov 2009 11:44:03 -0800 Subject: fix for infinite loop when doing /me emotes reviewed by Mark --- indra/llui/lltextbase.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index e210667764..3619b36c0d 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -60,6 +60,11 @@ LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S3 bool LLTextBase::compare_segment_end::operator()(const LLTextSegmentPtr& a, const LLTextSegmentPtr& b) const { + // sort empty spans (e.g. 11-11) after previous non-empty spans (e.g. 5-11) + if (a->getEnd() == b->getEnd()) + { + return a->getStart() < b->getStart(); + } return a->getEnd() < b->getEnd(); } -- cgit v1.2.3