]> granicus.if.org Git - neomutt/commitdiff
Mutt's detection of overly long lines would fail with text files
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 16 Aug 2001 12:42:30 +0000 (12:42 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 16 Aug 2001 12:42:30 +0000 (12:42 +0000)
when the long line is the last one, and is not finished by a newline
character.  This can, for instance, happen when you send out
macintosh-generated HTML files.

(And, apparently, we hit some boundary somewhere in the PGP code
with that - I had some truncated attachments today.)

sendlib.c

index 42e3980f8d4bcd6098f22f3780eb703945176db1..1930818b28f5ef371a116dd921e29e357832f007 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -552,6 +552,9 @@ static void update_content_info (CONTENT *info, CONTENT_STATE *s, char *d, size_
   {
     if (was_cr)
       info->binary = 1;
+    if (linelen > info->linemax)
+      info->linemax = linelen;
+
     return;
   }
 
@@ -641,6 +644,7 @@ static void update_content_info (CONTENT *info, CONTENT_STATE *s, char *d, size_
   s->dot = dot;
   s->linelen = linelen;
   s->was_cr = was_cr;
+  
 }
 
 /* Define as 1 if iconv sometimes returns -1(EILSEQ) instead of transcribing. */