diff options
author | Oz Linden <oz@lindenlab.com> | 2011-04-25 07:32:41 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-04-25 07:32:41 -0400 |
commit | 0bb7c0d351b04c874290d9b86ca03484ff6e98da (patch) | |
tree | e32aacd1482c076d460ad8181eaed483f36598d2 /indra/llui | |
parent | 391bef0df021dd3a56c262087ba977ab9f2bb662 (diff) | |
parent | 2147889a2e6acbcf233692d17a0b638a0e8eaec7 (diff) |
merge changes for storm-320
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lltextbase.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 82269282ef..fd7bb699f8 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2022,11 +2022,10 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, pos = segment_line_start + offset; break; } - else if (hit_past_end_of_line && segmentp->getEnd() > line_iter->mDocIndexEnd - 1) + else if (hit_past_end_of_line && segmentp->getEnd() >= line_iter->mDocIndexEnd) { // segment wraps to next line, so just set doc pos to the end of the line - // segment wraps to next line, so just set doc pos to start of next line (represented by mDocIndexEnd) - pos = llmin(getLength(), line_iter->mDocIndexEnd); + pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength()); break; } start_x += text_width; |