SL-18985 Crash at std::basic_string::erase

meow-7.2.2
Andrey Kleshchev 2023-01-17 22:06:22 +02:00 committed by akleshchev
parent 1c0d478436
commit 89f3bf6c13
1 changed files with 1 additions and 1 deletions

View File

@ -4438,7 +4438,7 @@ BOOL LLWindowWin32::handleImeRequests(WPARAM request, LPARAM param, LRESULT *res
LLWString context = find_context(wtext, preedit, preedit_length, &context_offset);
preedit -= context_offset;
preedit_length = llmin(preedit_length, (S32)context.length() - preedit);
if (preedit_length && preedit >= 0)
if (preedit_length > 0 && preedit >= 0)
{
// IMR_DOCUMENTFEED may be called when we have an active preedit.
// We should pass the context string *excluding* the preedit string.