aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/scan_result.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-04-11 01:14:37 +0600
committerGitHub <noreply@github.com>2024-04-11 01:14:37 +0600
commit6b23b885eb56be6d3f6717a7c5e39f5da81c2d6d (patch)
tree68b023e1637343e3d00d1831a0a5886745cc2b3b /src/libmime/scan_result.c
parent46791dc651c713678f96fbf9456513b3d3c3170c (diff)
parent4f3008f9682d4edb741913b2ee2aa9cd831f7d04 (diff)
downloadrspamd-6b23b885eb56be6d3f6717a7c5e39f5da81c2d6d.tar.gz
rspamd-6b23b885eb56be6d3f6717a7c5e39f5da81c2d6d.zip
Merge pull request #4918 from fatalbanana/grow_factor_tests
Add tests for grow_factor
Diffstat (limited to 'src/libmime/scan_result.c')
-rw-r--r--src/libmime/scan_result.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c
index 09c3208cf..ad3b5ef24 100644
--- a/src/libmime/scan_result.c
+++ b/src/libmime/scan_result.c
@@ -1101,7 +1101,7 @@ void rspamd_task_result_adjust_grow_factor(struct rspamd_task *task,
/* Adjust factor by selecting all symbols and checking those with positive scores */
kh_foreach(result->symbols, kk, res, {
if (res->score > 0) {
- double mult = 1.0 - grow_factor;
+ double mult = grow_factor - 1.0;
/* We adjust the factor by the ratio of the score to the max limit */
if (max_limit > 0 && !isnan(res->score)) {
mult *= res->score / max_limit;