diff options
author | Kitty Barnett <develop@catznip.com> | 2019-11-07 20:33:53 +0100 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2019-11-07 20:33:53 +0100 |
commit | b44ade68e6eea656dc0e31738f9603caffe4d659 (patch) | |
tree | 41181e0f5925cdcffd5dbb8b5205020151b9aa51 /indra/newview/llgiveinventory.h | |
parent | 5a6ddb2ea666e895890d3cb690cce5101cf12652 (diff) |
FIXED Calling LLTextBase::insertStringNoUndo() with more than one segment results in overlapping segment ranges
Text is only inserted into the view model *after* the segments are added so if seg1_pos_start is the current EOF:
-> 1st segment: getSegIterContaining(seg1_pos_start) returns the last segment and insertSegment() ends up properly adjusting its start/end position
-> 2nd segment: getSegIterContaining(seg2_pos_start) returns mSegments.end() since its position is beyond the available and insertSegment() leaves the last 2 segments with overlapping ranges
After the fix:
-> if index runs past the end of all segments then mSegments.end() is returned (no change)
-> if index is a position past the length of text but claimed by a segment then that segment is returned (change)
-> if index specifies a position in the middle of the document unclaimed by any segment then the first segment after that position is returned (no change)
(this does break the assertion that segment->mStart <= index <= segment->mEnd?)
Diffstat (limited to 'indra/newview/llgiveinventory.h')
0 files changed, 0 insertions, 0 deletions