From 685cd2ca4567a6984b74253c9f06328905ecfbf6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 18 Oct 2019 19:16:39 +0100 Subject: [PATCH] [Fix] Oops, fix math.huge invocation Issue: #3099 --- lualib/lua_meta.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lualib/lua_meta.lua b/lualib/lua_meta.lua index b7c9286d7..4f4a6e3ac 100644 --- a/lualib/lua_meta.lua +++ b/lualib/lua_meta.lua @@ -455,7 +455,7 @@ local function rspamd_gen_metatokens(task, names) for i,tok in ipairs(ct) do lua_util.debugm(N, task, "metatoken: %s = %s", mt.names[i], tok) - if tok ~= tok or tok == math.huge() then + if tok ~= tok or tok == math.huge then logger.errx(task, 'metatoken %s returned %s; replace it with 0 for sanity', mt.names[i], tok) tok = 0.0 @@ -471,7 +471,7 @@ local function rspamd_gen_metatokens(task, names) for _,n in ipairs(names) do if metatokens_by_name[n] then local tok = metatokens_by_name[n](task) - if tok ~= tok or tok == math.huge() then + if tok ~= tok or tok == math.huge then logger.errx(task, 'metatoken %s returned %s; replace it with 0 for sanity', n, tok) tok = 0.0 @@ -495,7 +495,7 @@ local function rspamd_gen_metatokens_table(task) for _,mt in ipairs(metafunctions) do local ct = mt.cb(task) for i,tok in ipairs(ct) do - if tok ~= tok or tok == math.huge() then + if tok ~= tok or tok == math.huge then logger.errx(task, 'metatoken %s returned %s; replace it with 0 for sanity', mt.names[i], tok) tok = 0.0 -- 2.39.5