From: Vsevolod Stakhov Date: Fri, 16 Mar 2018 13:22:21 +0000 (+0000) Subject: [Minor] Fix zero return value X-Git-Tag: 1.7.1~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6144d5af221210017513add86a53df8921f45a78;p=rspamd.git [Minor] Fix zero return value --- 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