1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
@- Fixed cases where preg_split() incorrectly terminated final element if
@  it contained null byte. (Andrei)
This commit is contained in:
Andrei Zmievski
2002-07-14 22:36:47 +00:00
parent da1a01ee93
commit 3650bab76f
+3 -2
View File
@@ -1245,8 +1245,9 @@ 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_string(return_value,
&Z_STRVAL_PP(subject)[start_offset], 1);
add_next_index_stringl(return_value,
&Z_STRVAL_PP(subject)[start_offset],
Z_STRLEN_PP(subject) - start_offset, 1);
}
}