summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorrichard <none@none>2009-12-17 11:44:01 -0800
committerrichard <none@none>2009-12-17 11:44:01 -0800
commit9abe9bf5dffeade7adbae99b3d5f7c9030fba0e5 (patch)
treef7334ae32df67ae29d80fa291d1734b36e3950be /indra/llui/lltextbase.cpp
parent724f5fbb7f7b101774c0cf3ff43bb98f9cc4ffc1 (diff)
clamp instead of assert when running out of room during reflow
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 6c983fd92e..4426bf5ddd 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1137,6 +1137,10 @@ void LLTextBase::reflow(S32 start_index)
// grow line height as necessary based on reported height of this segment
line_height = llmax(line_height, segment_height);
remaining_pixels -= segment_width;
+ if (remaining_pixels < 0)
+ {
+ remaining_pixels = 0;
+ }
// getNumChars() and getDimensions() should return consistent results
llassert_always(remaining_pixels >= 0);