From 3b64389668d181754ec08fc2f4c010bc5a9d3b98 Mon Sep 17 00:00:00 2001 From: Sergey Shambir Date: Tue, 12 Feb 2013 11:14:30 +0400 Subject: [PATCH] BookTextParser: fixed infinitive loop --- apps/openmw/mwgui/formatting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/formatting.cpp b/apps/openmw/mwgui/formatting.cpp index 4090b592d..1689d2fb1 100644 --- a/apps/openmw/mwgui/formatting.cpp +++ b/apps/openmw/mwgui/formatting.cpp @@ -160,7 +160,7 @@ std::vector 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());