diff options
author | Patrick Griffis <tingping@tingping.se> | 2020-09-17 15:50:28 -0700 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2020-09-17 15:50:28 -0700 |
commit | 453cb7ca79ace05f53667e523dc534bdeb7ddee0 (patch) | |
tree | 0a29c139d0d769480b6c13a0ccf384b96590862c /plugins/perl/perl.c | |
parent | 163608d7fd861c2c4911a38f45be484c88626bdc (diff) |
Increase max number of words a line can be split into
This may have unintended side-effects but 32 is a very low value and I was seeing real world bugs being caused by this. Specifically an ISUPPORT line with more features than this could store.
Diffstat (limited to 'plugins/perl/perl.c')
-rw-r--r-- | plugins/perl/perl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c index ab06dc96..cb563b38 100644 --- a/plugins/perl/perl.c +++ b/plugins/perl/perl.c @@ -283,6 +283,8 @@ list_item_to_sv ( hexchat_list *list, const char *const *fields ) return sv_2mortal (newRV_noinc ((SV *) hash)); } +#define WORD_ARRAY_LEN 48 + static AV * array2av (char *array[]) { @@ -293,7 +295,7 @@ array2av (char *array[]) for ( count = 1; - count < 32 && array[count] != NULL && array[count][0] != 0; + count < WORD_ARRAY_LEN && array[count] != NULL && array[count][0] != 0; count++ ) { temp = newSVpv (array[count], 0); |