summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchatbar.cpp8
-rw-r--r--indra/newview/llimpanel.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp2
3 files changed, 8 insertions, 4 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())
{
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 5f7d1a2ffa..b3b0c93b99 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -168,7 +168,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
LLUICtrlFactory::getInstance()->buildFloater(this, xml_filename, NULL);
setTitle(mSessionLabel);
- mInputEditor->setMaxTextLength(1023);
+ mInputEditor->setMaxTextLength(DB_IM_MSG_STR_LEN);
// enable line history support for instant message bar
mInputEditor->setEnableLineHistory(TRUE);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index cab6fbdc93..46d8f65d23 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -176,7 +176,7 @@ const F32 TIME_BEFORE_MESH_CLEANUP = 5.f; // seconds
const S32 AVATAR_RELEASE_THRESHOLD = 10; // number of avatar instances before releasing memory
const F32 FOOT_GROUND_COLLISION_TOLERANCE = 0.25f;
const F32 AVATAR_LOD_TWEAK_RANGE = 0.7f;
-const S32 MAX_BUBBLE_CHAT_LENGTH = 1023;
+const S32 MAX_BUBBLE_CHAT_LENGTH = DB_CHAT_MSG_STR_LEN;
const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12;
const F32 CHAT_FADE_TIME = 8.0;
const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f;