From 604da42458284fa001c40991b213a9c18f5d971a Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 11 Nov 2002 19:38:30 +0000 Subject: [PATCH] Fix #1366. --- sendlib.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/sendlib.c b/sendlib.c index 3ddb46f0..ebd82bc0 100644 --- 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. */ -- 2.40.0