diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-18 19:16:39 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-18 19:16:39 +0100 |
commit | 685cd2ca4567a6984b74253c9f06328905ecfbf6 (patch) | |
tree | ac2e6d01363bf787811a56947ad268eb62875260 /lualib | |
parent | e8a54f7987f0b753e6a4d6bacc76d9766b2a8303 (diff) | |
download | rspamd-685cd2ca4567a6984b74253c9f06328905ecfbf6.tar.gz rspamd-685cd2ca4567a6984b74253c9f06328905ecfbf6.zip |
[Fix] Oops, fix math.huge invocation
Issue: #3099
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_meta.lua | 6 |
1 files 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 |