From 78d474a58e79ee9e9c4d956ab3012a140a382cd2 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 21 Nov 2002 23:51:57 +0000 Subject: [PATCH] MFH --- ext/pcre/php_pcre.c | 4 +--- 1 file changed, 1 insertion(+), 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); } } -- 2.40.0