From 5d1c4e0143c4b3ee764448a27c28fd6e6a5b0035 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 5 Jul 2023 21:33:36 +0100 Subject: [PATCH] [Minor] Fix fuzzy_unlearn_handler when a flag is specified Issue: #4531 --- src/plugins/fuzzy_check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index fd8e56cce..8dff7a6c9 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; -- 2.39.5