1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Sync fix for bug #72910 with current upstream

This commit is contained in:
Stanislav Malyshev
2016-09-04 19:13:22 -07:00
parent b7259b71b4
commit d1fbc98ff6

View File

@@ -91,14 +91,16 @@ is_mbc_newline(const UChar* p, const UChar* end)
}
static OnigCodePoint
mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
mbc_to_code(const UChar* p, const UChar* end)
{
int c, len;
OnigCodePoint n;
len = enclen(ONIG_ENCODING_UTF8, p);
len = mbc_enc_len(p);
if (len > end - p) len = end - p;
c = *p++;
if (len > 1 && p < end) {
if (len > 1) {
len--;
n = c & ((1 << (6 - len)) - 1);
while (len--) {