From: Vsevolod Stakhov Date: Mon, 17 Sep 2018 13:09:56 +0000 (+0100) Subject: [Minor] Fix some minor issues X-Git-Tag: 1.8.0~89 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf76bbb67ab921f5c0b8b2a770c56a49e2707147;p=rspamd.git [Minor] Fix some minor issues --- diff --git a/lualib/lua_selectors.lua b/lualib/lua_selectors.lua index c42d53b24..3a7a3207f 100644 --- a/lualib/lua_selectors.lua +++ b/lualib/lua_selectors.lua @@ -66,7 +66,7 @@ uses any type by default)]], }, ['rcpts'] = { ['get_value'] = function(task, args) - local rcpts = task:get_rcpt(args[1] or 0) + local rcpts = task:get_recipients(args[1] or 0) if ((rcpts or E)[1] or E).addr then return rcpts,'email_list' end diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index 707d220ce..64f53773d 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -865,7 +865,7 @@ rspamd_re_cache_process_selector (struct rspamd_task *task, *lenvec = g_malloc (sizeof (guint) * (*n)); for (guint i = 0; i < *n; i ++) { - lua_rawgeti (L, -2, i + 1); + lua_rawgeti (L, -1, i + 1); (*svec)[i] = g_strdup (lua_tolstring (L, -1, &slen)); (*lenvec)[i] = slen; lua_pop (L, 1);