From 006b455c6a6b680d4b39a3d39efeb73d5bb7c546 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Fri, 3 Jan 2003 20:01:13 +0000 Subject: [PATCH] Fixed an iconv_strrpos() bug that the function doesn't return accurate position of last occurrence --- ext/iconv/iconv.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.50.1