mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
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:
commit
3bfd06061e
1 changed files with 5 additions and 3 deletions
|
@ -91,14 +91,16 @@ is_mbc_newline(const UChar* p, const UChar* end)
|
||||||
}
|
}
|
||||||
|
|
||||||
static OnigCodePoint
|
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;
|
int c, len;
|
||||||
OnigCodePoint n;
|
OnigCodePoint n;
|
||||||
|
|
||||||
len = enclen(ONIG_ENCODING_UTF8, p);
|
len = mbc_enc_len(p);
|
||||||
|
if (len > end - p) len = end - p;
|
||||||
|
|
||||||
c = *p++;
|
c = *p++;
|
||||||
if (len > 1 && p < end) {
|
if (len > 1) {
|
||||||
len--;
|
len--;
|
||||||
n = c & ((1 << (6 - len)) - 1);
|
n = c & ((1 << (6 - len)) - 1);
|
||||||
while (len--) {
|
while (len--) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue