diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-23 10:54:13 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-23 10:54:38 +0000 |
commit | 4d6b4e4349a0edd94f48d5472c6e3f0e4217052e (patch) | |
tree | 7ba13cb8e732723037ac97f2e8665defb6f45c06 /src/lua | |
parent | 57c6ed9257f72792d73c73c1ba51131d106d56d5 (diff) | |
download | rspamd-4d6b4e4349a0edd94f48d5472c6e3f0e4217052e.tar.gz rspamd-4d6b4e4349a0edd94f48d5472c6e3f0e4217052e.zip |
[Fix] Fix order of symbol options
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index a519be2ae..e6e66b900 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -940,7 +940,9 @@ lua_metric_symbol_callback (struct rspamd_task *task, gpointer ud) s = rspamd_task_insert_result (task, cd->symbol, flag, NULL); if (s) { - for (i = lua_gettop (L); i >= level + first_opt; i--) { + guint last_pos = lua_gettop (L); + + for (i = level + first_opt; i <= last_pos; i++) { if (lua_type (L, i) == LUA_TSTRING) { const char *opt = lua_tostring (L, i); |