diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-03 20:01:13 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-03 20:01:13 +0000 |
commit | 006b455c6a6b680d4b39a3d39efeb73d5bb7c546 (patch) | |
tree | 02e4f73a939b84dfee5f4bc35eb7d1f9e055203c /ext/iconv | |
parent | 4d3c4ab45dbd5648527f2351ac8018bcb64dd1e6 (diff) | |
download | php-git-006b455c6a6b680d4b39a3d39efeb73d5bb7c546.tar.gz |
Fixed an iconv_strrpos() bug that the function doesn't return accurate
position of last occurrence
Diffstat (limited to 'ext/iconv')
-rw-r--r-- | ext/iconv/iconv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 3c32243c83..d461ca4f4d 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -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; |