From 677fb1f55ca52d0e43c93f7d8361d333ff5bffd6 Mon Sep 17 00:00:00 2001 From: Hanno Date: Sun, 15 Jan 2017 22:20:23 +0100 Subject: perl_parse needs NULL terminated parameter list. --- src/perl/perl-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/perl') diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index 2c61df70..e4bde559 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -41,7 +41,7 @@ GSList *perl_scripts; PerlInterpreter *my_perl; static int print_script_errors; -static char *perl_args[] = {"", "-e", "0"}; +static char *perl_args[] = {"", "-e", "0", NULL}; #define IS_PERL_SCRIPT(file) \ (strlen(file) > 3 && g_strcmp0(file+strlen(file)-3, ".pl") == 0) @@ -123,7 +123,7 @@ void perl_scripts_init(void) my_perl = perl_alloc(); perl_construct(my_perl); - perl_parse(my_perl, xs_init, G_N_ELEMENTS(perl_args), perl_args, NULL); + perl_parse(my_perl, xs_init, G_N_ELEMENTS(perl_args)-1, perl_args, NULL); #if PERL_STATIC_LIBS == 1 perl_eval_pv("Irssi::Core::->boot_Irssi_Core(0.9);", TRUE); #endif -- cgit v1.2.3