diff options
| author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-07-03 17:43:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-03 17:43:22 +0200 |
| commit | f672ea15592909ba6394ae87ebd77abbee02a7a7 (patch) | |
| tree | 782f3c5fbb500665c1d559e3430a3670f8f2b01b /thirdparty/pcre2/src/pcre2_valid_utf.c | |
| parent | 165f3c31a5850b47f46d535e87783dd75db31e16 (diff) | |
| parent | 5383ae005cab1deafc1d822b473cb2b73df6f8df (diff) | |
Merge pull request #19138 from firefly2442/pcre2-10.31
update PCRE2 to version 10.31, fixes #15662
Diffstat (limited to 'thirdparty/pcre2/src/pcre2_valid_utf.c')
| -rw-r--r-- | thirdparty/pcre2/src/pcre2_valid_utf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/thirdparty/pcre2/src/pcre2_valid_utf.c b/thirdparty/pcre2/src/pcre2_valid_utf.c index 3e18f1200b..96e8bff993 100644 --- a/thirdparty/pcre2/src/pcre2_valid_utf.c +++ b/thirdparty/pcre2/src/pcre2_valid_utf.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 @@ -142,20 +142,20 @@ for (p = string; length > 0; p++) if (c < 0xc0) /* Isolated 10xx xxxx byte */ { - *erroroffset = (int)(p - string); + *erroroffset = (PCRE2_SIZE)(p - string); return PCRE2_ERROR_UTF8_ERR20; } if (c >= 0xfe) /* Invalid 0xfe or 0xff bytes */ { - *erroroffset = (int)(p - string); + *erroroffset = (PCRE2_SIZE)(p - string); return PCRE2_ERROR_UTF8_ERR21; } ab = PRIV(utf8_table4)[c & 0x3f]; /* Number of additional bytes (1-5) */ if (length < ab) /* Missing bytes */ { - *erroroffset = (int)(p - string); + *erroroffset = (PCRE2_SIZE)(p - string); switch(ab - length) { case 1: return PCRE2_ERROR_UTF8_ERR1; |