commit 1c07c47: [Minor] Fix grow_factor

Andrew Lewis nerf at judo.za.org
Mon Jul 29 17:55:30 UTC 2024


Author: Andrew Lewis
Date: 2024-04-10 16:03:07 +0200
URL: https://github.com/rspamd/rspamd/commit/1c07c471bb01b58e5b212d7e9b017a3d35fd0999

[Minor] Fix grow_factor

---
 src/libmime/scan_result.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;


More information about the Commits mailing list