From: Aki Tuomi Date: Tue, 29 Oct 2019 11:44:50 +0000 (+0200) Subject: lib-mail: message-snippet - Use i_isspace X-Git-Tag: 2.3.9~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=317fef0d5ec686da62c3ce45bd6c6215948c9785;p=thirdparty%2Fdovecot%2Fcore.git lib-mail: message-snippet - Use i_isspace This way we catch all the whitespace --- diff --git a/src/lib-mail/message-snippet.c b/src/lib-mail/message-snippet.c index 837edd22ef..560e499b04 100644 --- a/src/lib-mail/message-snippet.c +++ b/src/lib-mail/message-snippet.c @@ -50,8 +50,7 @@ static void snippet_add_content(struct snippet_context *ctx, /* skip NULs without increasing snippet size */ return; } - if (data[0] == '\r' || data[0] == '\n' || - data[0] == '\t' || data[0] == ' ') { + if (i_isspace(*data)) { /* skip any leading whitespace */ if (str_len(target->snippet) > 1) ctx->add_whitespace = TRUE;