summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichard <none@none>2009-11-23 11:44:03 -0800
committerrichard <none@none>2009-11-23 11:44:03 -0800
commitdc88effc24e533bd96c5e88de07720b347689f14 (patch)
tree3085341cd42653f3f411af3df4957287eaba63c2
parent7fd1488c6218ddbd82de0eea86297e65f2561bc7 (diff)
fix for infinite loop when doing /me emotes
reviewed by Mark
-rw-r--r--indra/llui/lltextbase.cpp5
1 files changed, 5 insertions, 0 deletions
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();
}