aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libmime/mime_headers.c14
1 files 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++;
+ }
}
}