summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorrichard <none@none>2009-11-11 12:21:23 -0800
committerrichard <none@none>2009-11-11 12:21:23 -0800
commitb34ee7f9f405e25ac606a16435ed49c7187387d8 (patch)
tree6af5fd639854dff2bb81f6d633725091e2c2fb4e /indra/llui/lltextbase.cpp
parent41a2849a2075f8c5b787e7ed5ac170aa9a339e19 (diff)
parent0a095bdaed81f4df90bceac3373fa3481787e7fb (diff)
merge
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 8d36c9c616..c819ed4fec 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2369,7 +2369,9 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt
height = mFontHeight;
width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars);
- return num_chars >= 1 && text[mStart + num_chars - 1] == '\n';
+ // if last character is a newline, then return true, forcing line break
+ llwchar last_char = text[mStart + first_char + num_chars - 1];
+ return num_chars >= 1 && last_char == '\n';
}
S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const