From c32c0ca0ee8727633bef81a2188135c20f1e1329 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 22 Mar 2018 11:02:58 +0000 Subject: [PATCH] [Fix] Allow to disable certain actions by assigning null to them --- lualib/lua_cfg_transform.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua index 60e2eb871..aa5e12624 100644 --- a/lualib/lua_cfg_transform.lua +++ b/lualib/lua_cfg_transform.lua @@ -268,7 +268,7 @@ return function(cfg) if not cfg.actions['no action'] and not cfg.actions['no_action'] and not cfg.actions['accept'] then for _,d in ipairs(actions_defs) do - if cfg.actions[d] then + if cfg.actions[d] and type(cfg.actions[d]) == 'number' then if cfg.actions[d] < 0 then cfg.actions['no action'] = cfg.actions[d] - 0.001 logger.infox('set no action score to: %s, as action %s has negative score', -- 2.39.5