diff options
| author | Christian Goetze (CG) <cg@lindenlab.com> | 2010-09-15 11:36:41 -0700 |
|---|---|---|
| committer | Christian Goetze (CG) <cg@lindenlab.com> | 2010-09-15 11:36:41 -0700 |
| commit | 3b2031e3ef82ceeeaf6fa45316ce7dbc1bbf7d97 (patch) | |
| tree | 509ad26077dfbbaf1bb85c3c4584d326d7532cbb /indra/newview/llchatbar.cpp | |
| parent | cbed6ecd2be9849aae900ef17070d7bd2aa9542c (diff) | |
| parent | bf2849ef2346b41ab096c4c7ce44756e3e20cd27 (diff) | |
Merge in lenny build fixes.
Diffstat (limited to 'indra/newview/llchatbar.cpp')
| -rw-r--r-- | indra/newview/llchatbar.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 7d82ec3a71..d251931eca 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -126,7 +126,7 @@ BOOL LLChatBar::postBuild() mInputEditor->setPassDelete(TRUE); mInputEditor->setReplaceNewlinesWithSpaces(FALSE); - mInputEditor->setMaxTextLength(1023); + mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN); mInputEditor->setEnableLineHistory(TRUE); mIsBuilt = TRUE; @@ -569,8 +569,12 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL S32 channel = 0; LLWString out_text = stripChannelNumber(wtext, &channel); std::string utf8_out_text = wstring_to_utf8str(out_text); - std::string utf8_text = wstring_to_utf8str(wtext); + if (!utf8_out_text.empty()) + { + utf8_out_text = utf8str_truncate(utf8_out_text, MAX_MSG_STR_LEN); + } + std::string utf8_text = wstring_to_utf8str(wtext); utf8_text = utf8str_trim(utf8_text); if (!utf8_text.empty()) { |
