From 0d33a57448b61167231b9bf999417a835d69d1bd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 5 Apr 2017 09:20:33 +0100 Subject: [PATCH] [Minor] Fix headers_foreach invocation --- src/lua/lua_mimepart.c | 2 +- src/lua/lua_task.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c index 07c389e97..7f6ede7ef 100644 --- a/src/lua/lua_mimepart.c +++ b/src/lua/lua_mimepart.c @@ -985,7 +985,7 @@ lua_mimepart_headers_foreach (lua_State *L) lua_pushstring (L, hdr->name); rspamd_lua_push_header (L, hdr, full, raw); - if (lua_pcall (L, 3, 1, 0) != 0) { + if (lua_pcall (L, 2, 1, 0) != 0) { msg_err ("call to header_foreach failed: %s", lua_tostring (L, -1)); lua_pop (L, 1); diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 96eec1faf..a3f0bc212 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -4056,7 +4056,7 @@ lua_task_headers_foreach (lua_State *L) lua_pushstring (L, hdr->name); rspamd_lua_push_header (L, hdr, full, raw); - if (lua_pcall (L, 3, 1, 0) != 0) { + if (lua_pcall (L, 2, 1, 0) != 0) { msg_err_task ("call to header_foreach failed: %s", lua_tostring (L, -1)); lua_pop (L, 1); -- 2.39.5