From: markus schnalke Date: Fri, 23 Oct 2015 07:52:55 +0000 (+0200) Subject: Fix off-by-one error (CPERLIN) X-Git-Tag: mmh-0.2-RC1~16 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=1cbc163b11d6dbabfe7206fb2f9ddf650337dad6;p=mmh Fix off-by-one error (CPERLIN) CPERLIN is the chars per line without the line break chars (\r\n), at least would that match the description in RFC 2822. Actually, however, the max SHOULD line length (excluding line break chars) is 78 according to the RFC. Therefore it seems as if we should set CPERLIN to 78. (This is open to decide and to do.) --- diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c index ba88319..87e7943 100644 --- a/uip/mhoutsbr.c +++ b/uip/mhoutsbr.c @@ -228,7 +228,7 @@ writeQuoted(CT ct, FILE *out) n = 0; } for (; *cp; cp++) { - if (n > CPERLIN - 3) { + if (n + 1 >= CPERLIN) { fputs("=\n", out); n = 0; }