From: Vsevolod Stakhov Date: Wed, 5 Jul 2023 20:33:36 +0000 (+0100) Subject: [Minor] Fix fuzzy_unlearn_handler when a flag is specified X-Git-Tag: 3.6~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d1c4e0143c4b3ee764448a27c28fd6e6a5b0035;p=thirdparty%2Frspamd.git [Minor] Fix fuzzy_unlearn_handler when a flag is specified Issue: #4531 --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index fd8e56cce4..8dff7a6c91 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -3867,7 +3867,7 @@ fuzzy_lua_unlearn_handler (lua_State *L) struct fuzzy_ctx *fuzzy_module_ctx = fuzzy_get_context (task->cfg); if (lua_type (L, 2) == LUA_TNUMBER) { - flag = lua_tonumber (L, 1); + flag = lua_tointeger (L, 2); } else if (lua_type (L, 2) == LUA_TSTRING) { struct fuzzy_rule *rule;