From 589218ecd65af1e1027ffe717ed607493a5c2ca7 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 30 May 2012 13:54:15 -0400 Subject: possible fix for storm-1866 (crash when first key in chat is space) --- indra/newview/llautoreplace.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/newview') 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: '"< '"<