This commit is contained in:
Ilia Alshanetsky 2002-11-21 23:51:52 +00:00
parent 7732ce7fe3
commit c7dd366c1a

View File

@ -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);
}
}