diff options
Diffstat (limited to 'src/plugins/scripts/perl/weechat-perl-api.c')
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl-api.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index 4136490c5..66157e3c8 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -2737,20 +2737,22 @@ static XS (XS_weechat_bar_item_search) char * weechat_perl_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, struct t_gui_window *window, - int max_width) + int max_width, int max_height) { struct t_script_callback *script_callback; - char *perl_argv[4], *ret; - static char buf[32]; + char *perl_argv[5], *ret; + static char str_width[32], str_height[32]; script_callback = (struct t_script_callback *)data; - snprintf (buf, sizeof (buf) - 1, "%d", max_width); + snprintf (str_width, sizeof (str_width), "%d", max_width); + snprintf (str_height, sizeof (str_height), "%d", max_height); perl_argv[0] = script_ptr2str (item); perl_argv[1] = script_ptr2str (window); - perl_argv[2] = buf; - perl_argv[3] = NULL; + perl_argv[2] = str_width; + perl_argv[3] = str_height; + perl_argv[4] = NULL; ret = (char *)weechat_perl_exec (script_callback->script, WEECHAT_SCRIPT_EXEC_STRING, |