diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-16 13:22:21 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-16 13:22:21 +0000 |
commit | 6144d5af221210017513add86a53df8921f45a78 (patch) | |
tree | 2dba74a85410a32043d156b566636b814c71754b /lualib/lua_squeeze_rules.lua | |
parent | b01c3e8dfb7df0842e705a8aeb3dc4f2c5ccfffa (diff) | |
download | rspamd-6144d5af221210017513add86a53df8921f45a78.tar.gz rspamd-6144d5af221210017513add86a53df8921f45a78.zip |
[Minor] Fix zero return value
Diffstat (limited to 'lualib/lua_squeeze_rules.lua')
-rw-r--r-- | lualib/lua_squeeze_rules.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lualib/lua_squeeze_rules.lua b/lualib/lua_squeeze_rules.lua index d351c5e20..1f442f819 100644 --- a/lualib/lua_squeeze_rules.lua +++ b/lualib/lua_squeeze_rules.lua @@ -47,7 +47,11 @@ local function gen_lua_squeeze_function(order) end elseif type(first) == 'number' then table.remove(ret, 1) - task:insert_result(sym, first, ret) + + if first ~= 0 then + task:insert_result(sym, first, ret) + end + end else task:insert_result(sym, 1.0, ret) end |