summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-05-30 13:54:15 -0400
committerOz Linden <oz@lindenlab.com>2012-05-30 13:54:15 -0400
commit589218ecd65af1e1027ffe717ed607493a5c2ca7 (patch)
treefbb9b3537232210213173986e98eac3c65052db0 /indra/newview
parent4fb29f36dbc1c1f89ceda914f93593d74e6edea7 (diff)
possible fix for storm-1866 (crash when first key in chat is space)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llautoreplace.cpp7
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;
- }
}
}
}