From 5d17ca75aa180e424a4d53c1ffad31644170f096 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 1 Mar 2019 11:05:04 +0000 Subject: [PATCH] [Minor] Allow nil as returned type --- src/lua/lua_config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index 9d7f3341c..884467e10 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -1170,6 +1170,10 @@ lua_metric_symbol_callback (struct rspamd_task *task, else if (type == LUA_TNUMBER) { res = lua_tonumber (L, level + 1); } + else if (type == LUA_TNIL) { + /* Can happen sometimes... */ + res = FALSE; + } else { g_assert_not_reached (); } -- 2.39.5