aboutsummaryrefslogtreecommitdiffstats
path: root/src/word.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2011-01-21 15:28:06 +0000
committerVincent Richard <[email protected]>2011-01-21 15:28:06 +0000
commit3cec9612fa84db2ff8e8246ba4b9353716817a90 (patch)
treedf72ec7f3a7354e57e4565262e5462702ba29698 /src/word.cpp
parentFixed boundary parsing (thanks to John van der Kamp, Zarafa). (diff)
downloadvmime-3cec9612fa84db2ff8e8246ba4b9353716817a90.tar.gz
vmime-3cec9612fa84db2ff8e8246ba4b9353716817a90.zip
Fixed possible infinite loop (thanks to John van der Kamp, Zarafa).
Diffstat (limited to 'src/word.cpp')
-rw-r--r--src/word.cpp2
1 files changed, 1 insertions, 1 deletions
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);