diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-08-06 12:05:43 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-08-06 12:06:46 +0100 |
commit | ba66d6a5bb73f10515484315c6b676603cd0edf1 (patch) | |
tree | 236aae12bb06c03e4dd929b9c16e82fe6e33d0d3 | |
parent | e1d59bdaf6c567d5074095d6eb3be03bac0b898e (diff) | |
download | rspamd-ba66d6a5bb73f10515484315c6b676603cd0edf1.tar.gz rspamd-ba66d6a5bb73f10515484315c6b676603cd0edf1.zip |
[Fix] Fix lua_next invocation
-rw-r--r-- | src/plugins/fuzzy_check.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index d0faaed95..6a2ad3e07 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -2945,8 +2945,10 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule, lua_gettable (L, -2); if (lua_type (L, -1) == LUA_TTABLE) { + gint tbl_pos = lua_gettop (L); - for (lua_pushnil (L); lua_next (L, 2); lua_pop (L, 1)) { + for (lua_pushnil (L); lua_next (L, tbl_pos); + lua_pop (L, 1)) { const gchar *h = NULL; gsize hlen = 0; |