summaryrefslogtreecommitdiff
path: root/src/plugins/lua/weechat-lua-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lua/weechat-lua-api.c')
-rw-r--r--src/plugins/lua/weechat-lua-api.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/lua/weechat-lua-api.c b/src/plugins/lua/weechat-lua-api.c
index f5bd9ec14..4022cfd92 100644
--- a/src/plugins/lua/weechat-lua-api.c
+++ b/src/plugins/lua/weechat-lua-api.c
@@ -5298,7 +5298,7 @@ weechat_lua_api_upgrade_read_cb (const void *pointer, void *data,
{
struct t_plugin_script *script;
void *func_argv[4];
- char empty_arg[1] = { '\0' }, str_object_id[32];
+ char empty_arg[1] = { '\0' };
const char *ptr_function, *ptr_data;
int *rc, ret;
@@ -5307,17 +5307,15 @@ weechat_lua_api_upgrade_read_cb (const void *pointer, void *data,
if (ptr_function && ptr_function[0])
{
- snprintf (str_object_id, sizeof (str_object_id), "%d", object_id);
-
func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg;
func_argv[1] = (char *)API_PTR2STR(upgrade_file);
- func_argv[2] = str_object_id;
+ func_argv[2] = &object_id;
func_argv[3] = (char *)API_PTR2STR(infolist);
rc = (int *) weechat_lua_exec (script,
WEECHAT_SCRIPT_EXEC_INT,
ptr_function,
- "ssss", func_argv);
+ "ssis", func_argv);
if (!rc)
ret = WEECHAT_RC_ERROR;