summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-04-18 23:42:39 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-04-18 23:42:39 +0300
commitce4c694b66b1e4ed479e5143b10616a76f2da18b (patch)
treeac4bd223fae0764c2c86e34283871f8cfafdafd8 /indra/llwindow
parente33f23f58a2caa561dfe4b3b114786f40983d136 (diff)
parentd031662435d97101411ae990ed85d6e001ab668a (diff)
Merge branch master (D540) into DRTVWR-546
# Conflicts: # indra/llcommon/llsdutil.cpp # indra/newview/VIEWER_VERSION.txt # indra/newview/lldrawpoolalpha.cpp # indra/newview/lldrawpoolwater.cpp
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowwin32.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 26e624c6ec..33b4257706 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -4369,7 +4369,8 @@ BOOL LLWindowWin32::handleImeRequests(WPARAM request, LPARAM param, LRESULT *res
S32 context_offset;
LLWString context = find_context(wtext, preedit, preedit_length, &context_offset);
preedit -= context_offset;
- if (preedit_length)
+ preedit_length = llmin(preedit_length, (S32)context.length() - preedit);
+ if (preedit_length && preedit >= 0)
{
// IMR_DOCUMENTFEED may be called when we have an active preedit.
// We should pass the context string *excluding* the preedit string.