summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHanno <hanno@gentoo.org>2017-01-15 22:20:23 +0100
committerHanno <hanno@gentoo.org>2017-01-15 22:20:23 +0100
commit677fb1f55ca52d0e43c93f7d8361d333ff5bffd6 (patch)
treedde50b3e7aeb842cd1c5c1e6066c104f5cb9a87a /src
parent305b02fc63bef37a8ddf4e8cdb6b961da07b8c66 (diff)
downloadirssi-677fb1f55ca52d0e43c93f7d8361d333ff5bffd6.zip
perl_parse needs NULL terminated parameter list.
Diffstat (limited to 'src')
-rw-r--r--src/perl/perl-core.c4
1 files changed, 2 insertions, 2 deletions
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