浏览代码

Merge pull request #4662 from Laserlicht/string_color

fixes string colorization bug
Ivan Savenko 1 年之前
父节点
当前提交
88f3e982e0
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      client/windows/CMessage.cpp

+ 7 - 0
client/windows/CMessage.cpp

@@ -125,7 +125,14 @@ std::vector<std::string> CMessage::breakText(std::string text, size_t maxLineWid
 		if(currPos < text.length() && (text[currPos] != 0x0a))
 		{
 			if(wordBreak != ui32(-1))
+			{
 				currPos = wordBreak;
+				if(text.substr(0, currPos).find('{') == std::string::npos)
+				{
+					opened = false;
+					color = "";
+				}
+			}
 			else
 				currPos -= symbolSize;
 		}