From 0f467cca8287f12aa890a4378c76946ccef55abf Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 18 Nov 2024 17:30:51 +0000 Subject: [Fix] More things to fix --- src/libmime/mime_headers.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index a511f5e36..f33311bbf 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -854,13 +854,6 @@ rspamd_mime_header_encode(const char *in, gsize len, bool is_structured) else { encoded_len++; - if (!need_encoding) { - unencoded_prefix++; - } - else { - unencoded_suffix++; - } - if (encoded_len > max_token_size) { piece_len = i; q = p + piece_len; @@ -875,6 +868,13 @@ rspamd_mime_header_encode(const char *in, gsize len, bool is_structured) /* No more space */ break; } + + if (!need_encoding) { + unencoded_prefix++; + } + else { + unencoded_suffix++; + } } } -- cgit v1.2.3