From: Moriyoshi Koizumi Date: Sun, 24 Nov 2002 19:21:58 +0000 (+0000) Subject: Fixed mb_parse_str() bug pointed out by Yasuo. X-Git-Tag: php-4.3.0RC2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07bec98624a5d5e2580ff95047e3f4060b92f1d8;p=php Fixed mb_parse_str() bug pointed out by Yasuo. --- diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 2a50dad1be..75760a9ce8 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1691,8 +1691,11 @@ PHP_FUNCTION(mb_parse_str) var = encstr; n = Z_STRLEN_PP(arg_str); while (n > 0) { - if (*var == *separator) { - num++; + char *p; + for (p = separator; *p != '\0'; ++p) { + if (*p == *var) { + num++; + } } var++; n--;