From e39008c291e4b7bede0328df76fccd06b33c5703 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 17 Jun 2019 16:55:31 +0100 Subject: [PATCH] [Minor] Try to fix types --- src/lua/lua_task.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 8359ccd9c..d1abe6a2b 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -4883,7 +4883,7 @@ lua_task_get_settings_id (lua_State *L) if (task != NULL) { if (task->settings_elt) { - lua_pushnumber (L, task->settings_elt->id); + lua_pushinteger (L, task->settings_elt->id); } else { lua_pushnil (L); @@ -4901,7 +4901,7 @@ lua_task_set_settings_id (lua_State *L) { LUA_TRACE_POINT; struct rspamd_task *task = lua_check_task (L, 1); - guint32 id = luaL_checknumber (L, 2); + guint32 id = lua_tointeger (L, 2); if (task != NULL && id != 0) { @@ -4916,7 +4916,7 @@ lua_task_set_settings_id (lua_State *L) id); if (!task->settings_elt) { - return luaL_error (L, "settings id %d is unknown", id); + return luaL_error (L, "settings id %u is unknown", id); } } -- 2.39.5