From: Wilfried Goesgens Date: Sat, 7 Dec 2013 16:26:38 +0000 (+0100) Subject: STRBUF: RFC2047-Encode Message - \r == 10 X-Git-Tag: v9.01~176 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=d40b93f83005fb433bd14870c66e0fa47b82b025 STRBUF: RFC2047-Encode Message - \r == 10 --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index dd15b0801..9275c26b7 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -2977,7 +2977,6 @@ int StrBufRFC2047encode(StrBuf **target, const StrBuf *source) ch = (unsigned char) source->buf[i]; if ((ch < 32) || (ch > 126) || - (ch == 61) || (ch == '=') || (ch == '?') || (ch == '_') || @@ -3037,12 +3036,12 @@ StrBuf *StrBufRFC2047encodeMessage(const StrBuf *EncodeMe) Optr = OutBuf->buf + Offset; OEptr = OutBuf->buf + OutBuf->BufSize; } - if ((*ptr == '\r') || (*ptr == '\n')) + if (*ptr == '\r') { /* ignore carriage returns */ ptr ++; } - else if (*ptr == 10) { + else if (*ptr == '\n') { /* hard line break */ if ((LinePos > 0) && (isspace(*(Optr-1)))) {