aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_headers.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-11-18 17:30:51 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-11-18 17:30:51 +0000
commit0f467cca8287f12aa890a4378c76946ccef55abf (patch)
tree9a8a07652a9c609b347b49420f2fd41784006c9b /src/libmime/mime_headers.c
parent4c1bfe96ff449fb68b8b363f8679ada84a2f82de (diff)
downloadrspamd-0f467cca8287f12aa890a4378c76946ccef55abf.tar.gz
rspamd-0f467cca8287f12aa890a4378c76946ccef55abf.zip
[Fix] More things to fix
Diffstat (limited to 'src/libmime/mime_headers.c')
-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++;
+ }
}
}