From 70bf3099ee792470dd484a4c489539ae742190c4 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 2 Aug 2010 17:58:55 -0400 Subject: [PATCH] Bug - Fixed bug in extractLine that performed std::string::length when it should have use the new characters function. The problem was incorrect hyphenation with utf8 text in narrow fields. --- src/text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.cpp b/src/text.cpp index 9548e59ed..db7fa511a 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -228,7 +228,7 @@ void extractLine (std::string& text, std::string& line, int length) // Special case: no \n, and less than length characters total. // special case: text.find ("\n") == std::string::npos && text.length () < length - if (eol == std::string::npos && text.length () <= (unsigned) length) + if (eol == std::string::npos && characters (text) <= (unsigned) length) { line = text; text = "";