- 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.
This commit is contained in:
Paul Beckingham 2010-08-02 17:58:55 -04:00
parent db27328558
commit 70bf3099ee

View file

@ -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 = "";