diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 21131a737..449fe6028 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -70,6 +70,8 @@ #include "rlvhandler.h" // [/RLVa:KB] +#include + // // Global statics // @@ -501,7 +503,7 @@ LLColor4 get_text_color(const LLChat& chat, bool from_im) } static const LLCachedControl sKeywordsChangeColor(gSavedPerAccountSettings, "KeywordsChangeColor", false); - if (sKeywordsChangeColor && gAgentID != chat.mFromID && chat.mSourceType != CHAT_SOURCE_SYSTEM && AscentKeyword::hasKeyword(chat.mText.substr(chat.mFromName.length()), 1)) + if (sKeywordsChangeColor && gAgentID != chat.mFromID && chat.mSourceType != CHAT_SOURCE_SYSTEM && AscentKeyword::hasKeyword(boost::starts_with(chat.mText, chat.mFromName) ? chat.mText.substr(chat.mFromName.length()) : chat.mText, 1)) { static const LLCachedControl sKeywordsColor(gSavedPerAccountSettings, "KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f)); text_color = sKeywordsColor;