summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-11-11 22:55:32 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-11-11 22:55:32 +0200
commitdb3991ca235f3ceefe888d03758cac5eccf1b552 (patch)
treec4712870f33c4b0fdcc13959ba2f940aa396b6b2 /indra/llui/lltextbase.cpp
parent2fd51b4c711aa7ab70da6d7e7dfcb380b87cbedf (diff)
parentb34ee7f9f405e25ac606a16435ed49c7187387d8 (diff)
Merge from default branch
--HG-- branch : product-engine
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 0ff0472b97..9706878a57 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2375,7 +2375,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