diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llui/lltextbase.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 0276ade3e1..3c284b3f03 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -3250,7 +3250,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin : LLFontGL::ONLY_WORD_BOUNDARIES; - LLWString offsetString(text.c_str() + segment_offset + mStart); + S32 offsetLength = text.length() - (segment_offset + mStart); if(getLength() < segment_offset + mStart) { @@ -3258,13 +3258,13 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << llendl; } - if(offsetString.length() + 1 < max_chars) + if( (offsetLength + 1) < max_chars) { - llinfos << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << " getLength() : " + llinfos << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetLength:\t" << offsetLength << " getLength() : " << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << llendl; } - S32 num_chars = mStyle->getFont()->maxDrawableChars(offsetString.c_str(), + S32 num_chars = mStyle->getFont()->maxDrawableChars( text.c_str() + (segment_offset + mStart), (F32)num_pixels, max_chars, word_wrap_style); |