From 834573afd5cb9495d12d5945bea07f64a6cae540 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 15 Jul 2019 16:41:05 +0100 Subject: [Minor] Lua_task: Use absolute value when dealing with neural tokens --- src/lua/lua_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 1167edb50..9fe61e07d 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -4449,7 +4449,7 @@ lua_task_process_ann_tokens (lua_State *L) !(rspamd_symcache_item_flags (sres->sym->cache_item) & SYMBOL_TYPE_NOSTAT)) { - lua_pushnumber (L, tanh (sres->score)); + lua_pushnumber (L, fabs (tanh (sres->score))); lua_rawseti (L, 3, offset + 1); } } -- cgit v1.2.3