diff options
| author | firefly2442 <firefly2442@gmail.com> | 2018-05-24 00:13:24 -0600 |
|---|---|---|
| committer | firefly2442 <firefly2442@gmail.com> | 2018-05-28 21:11:41 -0600 |
| commit | 5383ae005cab1deafc1d822b473cb2b73df6f8df (patch) | |
| tree | e5c9a7bf1471ae6a7ba76f0fd1529ba794589a28 /thirdparty/pcre2/src/pcre2_match_data.c | |
| parent | 38284bc6da801dcc0e1a6b47580a20b5ade32f06 (diff) | |
| download | redot-engine-5383ae005cab1deafc1d822b473cb2b73df6f8df.tar.gz | |
update PCRE2 to version 10.31, fixes #15662
Diffstat (limited to 'thirdparty/pcre2/src/pcre2_match_data.c')
| -rw-r--r-- | thirdparty/pcre2/src/pcre2_match_data.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/thirdparty/pcre2/src/pcre2_match_data.c b/thirdparty/pcre2/src/pcre2_match_data.c index 85ac998348..b297f326b5 100644 --- a/thirdparty/pcre2/src/pcre2_match_data.c +++ b/thirdparty/pcre2/src/pcre2_match_data.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016 University of Cambridge + New API code Copyright (c) 2016-2017 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ POSSIBILITY OF SUCH DAMAGE. * Create a match data block given ovector size * *************************************************/ -/* A minimum of 1 is imposed on the number of ovector triplets. */ +/* A minimum of 1 is imposed on the number of ovector pairs. */ PCRE2_EXP_DEFN pcre2_match_data * PCRE2_CALL_CONVENTION pcre2_match_data_create(uint32_t oveccount, pcre2_general_context *gcontext) @@ -59,7 +59,7 @@ pcre2_match_data_create(uint32_t oveccount, pcre2_general_context *gcontext) pcre2_match_data *yield; if (oveccount < 1) oveccount = 1; yield = PRIV(memctl_malloc)( - sizeof(pcre2_match_data) + 3*oveccount*sizeof(PCRE2_SIZE), + offsetof(pcre2_match_data, ovector) + 2*oveccount*sizeof(PCRE2_SIZE), (pcre2_memctl *)gcontext); if (yield == NULL) return NULL; yield->oveccount = oveccount; |
