1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-17 20:58:07 +02:00

fixes string colorisation bug

This commit is contained in:
Laserlicht 2024-09-23 21:07:00 +02:00
parent 43666ec987
commit 03d03491b5

View File

@ -130,7 +130,11 @@ 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;
}
else
currPos -= symbolSize;
}