aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/milter_headers.lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2021-09-06 11:17:28 +0200
committerAndrew Lewis <nerf@judo.za.org>2021-09-06 11:17:28 +0200
commit14be23205a19ae111447aee2b2b10264a7278f74 (patch)
treed5be1e1c6f0a7941cee4c5e80ef337988a8a7fd1 /src/plugins/lua/milter_headers.lua
parentb9aa9bf59bfc0816c84b097940c8c44575d6ebc5 (diff)
downloadrspamd-14be23205a19ae111447aee2b2b10264a7278f74.tar.gz
rspamd-14be23205a19ae111447aee2b2b10264a7278f74.zip
[Minor] Another PUC-Rio Lua compatibility fix
- Reported by @mebourne
Diffstat (limited to 'src/plugins/lua/milter_headers.lua')
-rw-r--r--src/plugins/lua/milter_headers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua
index 1b58cee86..6704ba3f2 100644
--- a/src/plugins/lua/milter_headers.lua
+++ b/src/plugins/lua/milter_headers.lua
@@ -356,9 +356,9 @@ local function milter_headers(task)
local score = common['metric_score'][1]
local spambar
if score <= -1 then
- spambar = string.rep(local_mod.negative, score * (-1))
+ spambar = string.rep(local_mod.negative, math.floor(score * -1))
elseif score >= 1 then
- spambar = string.rep(local_mod.positive, score)
+ spambar = string.rep(local_mod.positive, math.floor(score))
else
spambar = local_mod.neutral
end