Fixed an iconv_strrpos() bug that the function doesn't return accurate

position of last occurrence
This commit is contained in:
Moriyoshi Koizumi 2003-01-03 20:01:13 +00:00
parent 4d3c4ab45d
commit 006b455c6a

View File

@ -910,6 +910,9 @@ static php_iconv_err_t _php_iconv_strpos(unsigned int *pretval,
ndl_buf_left -= GENERIC_SUPERSET_NBYTES;
if (ndl_buf_left == 0) {
*pretval = match_ofs;
ndl_buf_p = ndl_buf;
ndl_buf_left = ndl_buf_len;
match_ofs = -1;
}
} else {
unsigned int i, j, lim;