]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix zero return value
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Mar 2018 13:22:21 +0000 (13:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Mar 2018 13:22:21 +0000 (13:22 +0000)
lualib/lua_squeeze_rules.lua

index d351c5e20e8e16a4c4697e51cd2dedbb870c5a70..1f442f8193ddf04216760f020ffac359675edd93 100644 (file)
@@ -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