diff options
author | Heiko Schlichting <heiko@fu-berlin.de> | 2021-02-19 11:11:51 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-02-19 11:51:17 +0000 |
commit | 6296a393aeab9fecc38916dfcbf1c94d54691650 (patch) | |
tree | 9425b33d4a9e9f4c4fef0a21c1a375f974ee1a78 /src | |
parent | da5bb54c39af2b6bf43738518fb4c2c62af0edb7 (diff) |
Fix weight calculation for spamd_address. Bug 2694
Diffstat (limited to 'src')
-rw-r--r-- | src/src/spam.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/src/spam.c b/src/src/spam.c index 3318bff49..b0e24b368 100644 --- a/src/src/spam.c +++ b/src/src/spam.c @@ -174,7 +174,7 @@ for (long rnd = random() % weights, i = 0; i < num_servers; i++) { sd = spamds[i]; if (!sd->is_failed && sd->priority == pri) - if ((rnd -= sd->weight) <= 0) + if ((rnd -= sd->weight) < 0) return i; } |