summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/guile
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/scripts/guile')
-rw-r--r--src/plugins/scripts/guile/weechat-guile-api.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/scripts/guile/weechat-guile-api.c b/src/plugins/scripts/guile/weechat-guile-api.c
index 8afb11b21..4e5084567 100644
--- a/src/plugins/scripts/guile/weechat-guile-api.c
+++ b/src/plugins/scripts/guile/weechat-guile-api.c
@@ -2361,25 +2361,23 @@ weechat_guile_api_hook_process_cb (void *data,
{
struct t_script_callback *script_callback;
void *func_argv[5];
- char str_rc[32], empty_arg[1] = { '\0' };
+ char empty_arg[1] = { '\0' };
int *rc, ret;
script_callback = (struct t_script_callback *)data;
if (script_callback && script_callback->function && script_callback->function[0])
{
- snprintf (str_rc, sizeof (str_rc), "%d", return_code);
-
func_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
func_argv[1] = (command) ? (char *)command : empty_arg;
- func_argv[2] = str_rc;
+ func_argv[2] = &return_code;
func_argv[3] = (out) ? (char *)out : empty_arg;
func_argv[4] = (err) ? (char *)err : empty_arg;
rc = (int *) weechat_guile_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_INT,
script_callback->function,
- "sssss", func_argv);
+ "ssiss", func_argv);
if (!rc)
ret = WEECHAT_RC_ERROR;