[gmime: 19/27] Improved header folding logic



commit 82835f069d96f0cefac5362506668de0c597773e
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Thu Nov 9 22:06:24 2017 -0500

    Improved header folding logic
    
    Fixes issue #29

 gmime/gmime-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index ddfe565..bebc97c 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -2141,7 +2141,7 @@ rfc2047_encode_get_rfc822_words (const char *in, gboolean phrase)
                                encoding = 2;
                        }
                        
-                       if (count >= GMIME_FOLD_PREENCODED) {
+                       if (count >= (type == WORD_2047 ? GMIME_FOLD_PREENCODED : GMIME_FOLD_LEN)) {
                                if (type == WORD_ATOM)
                                        type = WORD_2047;
                                


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]