]> granicus.if.org Git - php/commitdiff
Increment replace count value for case-sensitive single char searches.
authorAndrei Zmievski <andrei@php.net>
Thu, 5 Oct 2006 18:23:19 +0000 (18:23 +0000)
committerAndrei Zmievski <andrei@php.net>
Thu, 5 Oct 2006 18:23:19 +0000 (18:23 +0000)
ext/standard/string.c

index 759528a232d3906916b9938a8eb7fdbb7e726c14..29ef9c107c2899b961129af98a71c162f93956bb 100644 (file)
@@ -3155,6 +3155,9 @@ PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_l
                        target += to_len;
                        p++;
                        s = p;
+                       if (replace_count) {
+                               *replace_count += 1;
+                       }
                }
                if (s < e) {
                        memcpy(target, s, (e - s));