summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2006-10-05 18:23:19 +0000
committerAndrei Zmievski <andrei@php.net>2006-10-05 18:23:19 +0000
commite779c3aa3635f7e3ea15f13cb4320830c68bed4d (patch)
tree77f2fa308e3db5174b82e3d40dd3c018ea74ec8c
parent93909bb30e9ffe70e03eac50e100ec4f2fb79ecd (diff)
downloadphp-git-e779c3aa3635f7e3ea15f13cb4320830c68bed4d.tar.gz
Increment replace count value for case-sensitive single char searches.
-rw-r--r--ext/standard/string.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 759528a232..29ef9c107c 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -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));