mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
memcmp
begins from the second char.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
This commit is contained in:
parent
eb4342eb14
commit
e6519cb69d
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ zend_memnrstr(const char *haystack, const char *needle, size_t needle_len, char
|
|||
|
||||
do {
|
||||
if ((p = (const char *)zend_memrchr(haystack, *needle, (p - haystack) + 1)) && ne == p[needle_len-1]) {
|
||||
if (!memcmp(needle, p, needle_len - 1)) {
|
||||
if (!memcmp(needle + 1, p + 1, needle_len - 2)) {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue