]> granicus.if.org Git - mutt/commitdiff
Fix #1366.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 11 Nov 2002 19:38:30 +0000 (19:38 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 11 Nov 2002 19:38:30 +0000 (19:38 +0000)
sendlib.c

index 3ddb46f067a2394cb2de520535093959d4f7508f..ebd82bc0f2971deb07e172d0a7e09b81ac842c3f 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -148,23 +148,6 @@ static void encode_quoted (FGETCONV * fc, FILE *fout, int istext)
 
   while ((c = fgetconv (fc)) != EOF)
   {
-    /* Escape lines that begin with/only contain "the message separator". */
-    if (linelen == 4 && !mutt_strncmp ("From", line, 4))
-    {
-      strfcpy (line, "=46rom", sizeof (line));
-      linelen = 6;
-    }
-    else if (linelen == 4 && !mutt_strncmp ("from", line, 4))
-    {
-      strfcpy (line, "=66rom", sizeof (line));
-      linelen = 6;
-    }
-    else if (linelen == 1 && line[0] == '.')
-    {
-      strfcpy (line, "=2E", sizeof (line));
-      linelen = 3;
-    }
-
     /* Wrap the line if needed. */
     if (linelen == 76 && ((istext && c != '\n') || !istext))
     {
@@ -195,6 +178,24 @@ static void encode_quoted (FGETCONV * fc, FILE *fout, int istext)
       }
     }
 
+    /* Escape lines that begin with/only contain "the message separator". */
+    if (linelen == 4 && !mutt_strncmp ("From", line, 4))
+    {
+      strfcpy (line, "=46rom", sizeof (line));
+      linelen = 6;
+    }
+    else if (linelen == 4 && !mutt_strncmp ("from", line, 4))
+    {
+      strfcpy (line, "=66rom", sizeof (line));
+      linelen = 6;
+    }
+    else if (linelen == 1 && line[0] == '.')
+    {
+      strfcpy (line, "=2E", sizeof (line));
+      linelen = 3;
+    }
+
+
     if (c == '\n' && istext)
     {
       /* Check to make sure there is no trailing space on this line. */