diff options
author | Oz Linden <oz@lindenlab.com> | 2012-05-30 13:54:15 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-05-30 13:54:15 -0400 |
commit | 589218ecd65af1e1027ffe717ed607493a5c2ca7 (patch) | |
tree | fbb9b3537232210213173986e98eac3c65052db0 /indra/newview/llautoreplace.cpp | |
parent | 4fb29f36dbc1c1f89ceda914f93593d74e6edea7 (diff) |
possible fix for storm-1866 (crash when first key in chat is space)
Diffstat (limited to 'indra/newview/llautoreplace.cpp')
-rw-r--r-- | indra/newview/llautoreplace.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index 5a3689cee6..641e354605 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -56,7 +56,7 @@ void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) if (atSpace || haveWord) { - if (atSpace) + if (atSpace && wordEnd > 0) { // find out if this space immediately follows a word wordEnd--; @@ -92,11 +92,6 @@ void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) inputText = wstring_to_utf8str(text); cursorPos+=size_change; } - else - { - // @TODO display replacement as tooltip? - LL_DEBUGS("AutoReplace")<<"tooltip: '"<<lastWord<<"' -> '"<<replacementWord<<"'"<<LL_ENDL; - } } } } |