From cf594afb833cb09819b5d1a4edacd0d00808045a Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 1 Aug 2016 17:18:16 +0200 Subject: [PATCH] mmime: fix prevq logic --- mmime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mmime.c b/mmime.c index c46b0a5..bff5112 100644 --- a/mmime.c +++ b/mmime.c @@ -242,6 +242,7 @@ print_header(char *line) { printf("?=\n"); s += w; linelen = 0; + prevq = 1; } if (s < e) { if (linelen + (e-s)+13 > 78) { @@ -253,13 +254,13 @@ print_header(char *line) { linelen += 13; linelen += gen_qp((uint8_t *)s, e-s, 999, 1); printf("?="); + prevq = 1; } else { fwrite(s, 1, e-s, stdout); linelen += e-s; prevq = 0; } } - prevq = 1; } else { if (linelen + (e-s) > 78) { printf("\n");