1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

BookTextParser: fixed infinitive loop

This commit is contained in:
Sergey Shambir 2013-02-12 11:14:30 +04:00
parent ba97c8f7d6
commit 3b64389668

View File

@ -160,7 +160,7 @@ std::vector<std::string> BookTextParser::split(std::string text, const int width
++i;
}
if (currentHeight > height-spacing)
if (currentHeight > height-spacing && currentText.size() != currentWord.size())
{
// remove the last word
currentText.erase(currentText.size()-currentWord.size(), currentText.size());