diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2026-03-30 21:43:31 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> | 2026-03-31 00:09:42 +0300 |
| commit | c9dcd5b2dce0566731ab4ccd8892e5da146807f3 (patch) | |
| tree | aaf609d181d24c1054fda280547ae1b6cddcba8f /indra/llui/llkeywords.cpp | |
| parent | 5ffcdc3c9c3b33e04dbaa7397fc73d53857acd5b (diff) | |
#5572 Fix overlapping segment ops for namespaced SLua keywords
Diffstat (limited to 'indra/llui/llkeywords.cpp')
| -rw-r--r-- | indra/llui/llkeywords.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index fd9991fd11..b1f1fb77f3 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -812,8 +812,10 @@ void LLKeywords::collectSegmentOps(segment_ops_t& ops, const LLWString& wtext, b if (map_iter != mWordTokenMap.end()) { - // Found a match for the function part - ops.push_back({SegmentOp::OP_TOKEN, seg_start, seg_end, map_iter->second}); + // Found a match for the function part. + // Start must be after the dot (seg_start + prefix_len + 1), + // not at seg_start, to avoid overlapping with the prefix segment. + ops.push_back({SegmentOp::OP_TOKEN, seg_start + prefix_len + 1, seg_end, map_iter->second}); } } } |
