aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-01 17:18:16 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-01 17:18:16 +0200
commitcf594afb833cb09819b5d1a4edacd0d00808045a (patch)
treea2c74a9ef3aa0ac50c0e57dcd9740c2a79dd3475
parent88898a4e5e3b928961335b6a7334c7f1902d2186 (diff)
downloadmblaze-cf594afb833cb09819b5d1a4edacd0d00808045a.tar.gz
mmime: fix prevq logic
-rw-r--r--mmime.c3
1 files changed, 2 insertions, 1 deletions
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");