From 7f2ee184410e48cb660ca06a02a44b47082cab8c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 25 Feb 2015 15:04:55 +0000 Subject: [PATCH] Use position from the arguments. --- src/lua/lua_task.c | 4 ++-- 1 file 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; } -- 2.39.5