diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-11-21 23:51:52 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-11-21 23:51:52 +0000 |
commit | c7dd366c1aa167b00daea5d210673e63ba61fdf6 (patch) | |
tree | f9ab95e293367f40db783e387ab6c8cab4448733 /ext/pcre/php_pcre.c | |
parent | 7732ce7fe332c37430e6fb539a3d64f05cfc38be (diff) | |
download | php-git-c7dd366c1aa167b00daea5d210673e63ba61fdf6.tar.gz |
Fixed bug #20528.
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 64c51466ef..fecd459afc 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1269,9 +1269,7 @@ PHP_FUNCTION(preg_split) add_offset_pair(return_value, &Z_STRVAL_PP(subject)[start_offset], Z_STRLEN_PP(subject) - start_offset, start_offset); } else { /* Add the last piece to the return value */ - add_next_index_stringl(return_value, - &Z_STRVAL_PP(subject)[start_offset], - Z_STRLEN_PP(subject) - start_offset, 1); + add_next_index_stringl(return_value, last_match, Z_STRVAL_PP(subject) + Z_STRLEN_PP(subject) - last_match, 1); } } |