aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-25 15:04:55 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-25 17:46:11 +0000
commit7f2ee184410e48cb660ca06a02a44b47082cab8c (patch)
tree62d1061fc5404ff1070143e6e98e9c7b38ca239b /src/lua
parent92668308763bfefa568ffc7ddcf4d577556bc99f (diff)
downloadrspamd-7f2ee184410e48cb660ca06a02a44b47082cab8c.tar.gz
rspamd-7f2ee184410e48cb660ca06a02a44b47082cab8c.zip
Use position from the arguments.
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 63646f6fb..98083f187 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -661,8 +661,8 @@ static const struct luaL_reg urllib_m[] = {
struct rspamd_task *
lua_check_task (lua_State * L, gint pos)
{
- void *ud = luaL_checkudata (L, 1, "rspamd{task}");
- luaL_argcheck (L, ud != NULL, 1, "'task' expected");
+ void *ud = luaL_checkudata (L, pos, "rspamd{task}");
+ luaL_argcheck (L, ud != NULL, pos, "'task' expected");
return ud ? *((struct rspamd_task **)ud) : NULL;
}