From: Andrew Lewis Date: Mon, 6 Sep 2021 09:17:28 +0000 (+0200) Subject: [Minor] Another PUC-Rio Lua compatibility fix X-Git-Tag: 3.1~191^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3880%2Fhead;p=thirdparty%2Frspamd.git [Minor] Another PUC-Rio Lua compatibility fix - Reported by @mebourne --- diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua index 1b58cee860..6704ba3f23 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