diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-23 11:36:10 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-23 11:36:10 +0000 |
commit | a4275bebf7634e51a164aa186fc09e3581454519 (patch) | |
tree | a2d2efcd92808fb52eddbba926ae70bc13e9b75b /src | |
parent | bfeff0ab44bf0062a6ad3083b3becde22f08d4cf (diff) | |
download | rspamd-a4275bebf7634e51a164aa186fc09e3581454519.tar.gz rspamd-a4275bebf7634e51a164aa186fc09e3581454519.zip |
Fix indexing for received headers.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_task.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index e19200027..d9840275f 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -1134,7 +1134,7 @@ lua_task_get_received_headers (lua_State * L) { struct rspamd_task *task = lua_check_task (L, 1); struct received_header *rh; - guint i; + guint i, k = 1; if (task) { lua_newtable (L); @@ -1160,7 +1160,7 @@ lua_task_get_received_headers (lua_State * L) rspamd_lua_ip_push_fromstring (L, rh->real_ip); lua_settable (L, -3); rspamd_lua_table_set (L, "by_hostname", rh->by_hostname); - lua_rawseti (L, -2, i + 1); + lua_rawseti (L, -2, k ++); } } else { |