forked from mirror/openmw-tes3mp
fixed a crash
This commit is contained in:
parent
5b08baf5bf
commit
846196d048
1 changed files with 13 additions and 6 deletions
|
@ -145,7 +145,9 @@ void addColorInString(std::string& str, const std::string& keyword,std::string c
|
||||||
str.insert(pos,color2);
|
str.insert(pos,color2);
|
||||||
pos+= color2.length();
|
pos+= color2.length();
|
||||||
}
|
}
|
||||||
else if(str.substr(pos -1,1) == " ")
|
else
|
||||||
|
{
|
||||||
|
if(str.substr(pos -1,1) == " ")
|
||||||
{
|
{
|
||||||
str.insert(pos,color1);
|
str.insert(pos,color1);
|
||||||
pos += color1.length();
|
pos += color1.length();
|
||||||
|
@ -153,6 +155,11 @@ void addColorInString(std::string& str, const std::string& keyword,std::string c
|
||||||
str.insert(pos,color2);
|
str.insert(pos,color2);
|
||||||
pos+= color2.length();
|
pos+= color2.length();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pos += keyword.length();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue