Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  Sync fix for bug #72910 with current upstream
This commit is contained in:
Stanislav Malyshev 2016-09-04 19:15:45 -07:00
commit 3bfd06061e

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--) {