This commit is contained in:
Nikita Popov 2019-01-24 15:13:49 +01:00
parent d460e06cb9
commit 3c98c2d0cb
3 changed files with 18 additions and 3 deletions

View file

@ -713,8 +713,7 @@ static inline void mb_regex_substitute(
sp = p; /* save position */
clen = (int) php_mb_mbchar_bytes_ex(++p, enc);
if (clen != 1 || p == eos) {
/* skip escaped multibyte char */
p += clen;
/* skip backslash followed by multibyte char */
smart_str_appendl(pbuf, sp, p - sp);
continue;
}