]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Properly set config field when creating tasks from Lua
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 9 Nov 2023 17:53:02 +0000 (17:53 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 13 Nov 2023 11:02:09 +0000 (11:02 +0000)
src/lua/lua_task.c

index 427314745a2bcae19c5c0dc60372a6edcc640775..fe6e498c9ee942ab0eb1930d3c1c604cc1906b96 100644 (file)
@@ -1847,7 +1847,7 @@ lua_task_create(lua_State *L)
 
        if (lua_type(L, 1) == LUA_TUSERDATA) {
                gpointer p;
-               p = rspamd_lua_check_udata_maybe(L, 2, "rspamd{config}");
+               p = rspamd_lua_check_udata_maybe(L, 1, "rspamd{config}");
 
                if (p) {
                        cfg = *(struct rspamd_config **) p;