From 3cec9612fa84db2ff8e8246ba4b9353716817a90 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Fri, 21 Jan 2011 15:28:06 +0000 Subject: Fixed possible infinite loop (thanks to John van der Kamp, Zarafa). --- src/word.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/word.cpp') diff --git a/src/word.cpp b/src/word.cpp index db720dc1..1c1c1a6b 100644 --- a/src/word.cpp +++ b/src/word.cpp @@ -386,7 +386,7 @@ void word::generate(utility::outputStream& os, const string::size_type maxLineLe maxRunLength = std::max(maxRunLength, curRunLength); - if (maxRunLength >= maxLineLength - 3) + if (((flags & text::FORCE_NO_ENCODING) == 0) && maxRunLength >= maxLineLength - 3) { // Generate with encoding forced generate(os, maxLineLength, curLinePos, newLinePos, flags | text::FORCE_ENCODING, state); -- cgit v1.2.3