From: Vsevolod Stakhov Date: Wed, 25 Feb 2015 15:04:55 +0000 (+0000) Subject: Use position from the arguments. X-Git-Tag: 0.9.0~620 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7f2ee184410e48cb660ca06a02a44b47082cab8c;p=rspamd.git Use position from the arguments. --- 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; }