aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-14 14:09:50 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-14 14:09:50 +0200
commit7b6436797c0d5ddbb290121ff9e1109faeccff0f (patch)
tree901817b814e63b88f1de12d7d25c2630b5f9aefd
parent1ff1ff3dd0d00990ddf88c37233fdb70dfdad746 (diff)
downloadmblaze-7b6436797c0d5ddbb290121ff9e1109faeccff0f.tar.gz
blaze822: remaining fixes in new loop
-rw-r--r--blaze822.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/blaze822.c b/blaze822.c
index 7572788..7794301 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -235,13 +235,12 @@ compress_hdr(char *s, char *end)
}
*t++ = *h++;
}
- // zero fill gap
- while (t < h)
- *t++ = 0;
// remove trailing whitespace
- t--;
while (s < t && isfws(t[-1]))
*--t = 0;
+ // zero fill gap
+ while (t < h)
+ *t++ = 0;
}
}
@@ -277,7 +276,7 @@ unfold_hdr(char *buf, char *end)
}
while (s < end) {
- s = memchr(s+1, '\n', end-buf);
+ s = memchr(s+1, '\n', end-s);
if (!s)
break;
@@ -293,6 +292,7 @@ unfold_hdr(char *buf, char *end)
}
}
}
+ compress_hdr(l, end);
}
struct message *