]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Allow nil as returned type
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 1 Mar 2019 11:05:04 +0000 (11:05 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 1 Mar 2019 11:05:04 +0000 (11:05 +0000)
src/lua/lua_config.c

index 9d7f3341cb06d6a5988b1dd84bad697ae50fbbe7..884467e10503b4ccfc53a9b7decab475d68e5344 100644 (file)
@@ -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 ();
                        }