aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_config.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-06 21:56:13 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-06 21:56:13 +0100
commit1b5151533711e1c14f78c1e65c4902506b27ba1f (patch)
tree3387e5125e0d2e6e6e277fae946850ba32a55738 /src/libstat/stat_config.c
parent37ad53dee0c78deaaef3cf15212a081c8b460bed (diff)
downloadrspamd-1b5151533711e1c14f78c1e65c4902506b27ba1f.tar.gz
rspamd-1b5151533711e1c14f78c1e65c4902506b27ba1f.zip
[Minor] Fix runtime issues
Diffstat (limited to 'src/libstat/stat_config.c')
-rw-r--r--src/libstat/stat_config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstat/stat_config.c b/src/libstat/stat_config.c
index 59159da63..f153be737 100644
--- a/src/libstat/stat_config.c
+++ b/src/libstat/stat_config.c
@@ -115,7 +115,7 @@ rspamd_stat_init (struct rspamd_config *cfg, struct event_base *ev_base)
if (lua_type (L, -1) == LUA_TTABLE) {
lua_pushnil (L);
- while (lua_next (L, -1) != 0) {
+ while (lua_next (L, -2) != 0) {
lua_classifiers_cnt ++;
lua_pop (L, 1);
}
@@ -138,7 +138,7 @@ rspamd_stat_init (struct rspamd_config *cfg, struct event_base *ev_base)
if (lua_type (L, -1) == LUA_TTABLE) {
lua_pushnil (L);
- while (lua_next (L, -1) != 0) {
+ while (lua_next (L, -2) != 0) {
lua_pushvalue (L, -2);
memcpy (&stat_ctx->classifiers_subrs[i], &lua_classifier,
sizeof (struct rspamd_stat_classifier));