summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2000-06-30 19:40:42 +0000
committerAndrei Zmievski <andrei@php.net>2000-06-30 19:40:42 +0000
commit1ca7f07d1aa28743db74194b0f2bc98b1f0a3748 (patch)
tree901800efe5acfa44a8a85d4b0d3dc396e17c3aa4 /ext/pcre/php_pcre.c
parent5f81cba573567d2241a851bb160296dc8c67f0d6 (diff)
downloadphp-git-1ca7f07d1aa28743db74194b0f2bc98b1f0a3748.tar.gz
Typo.
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index d06d8fd589..55555c1d08 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -417,7 +417,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
matched++;
match = (*subject)->value.str.val + offsets[0];
- /* If subpatters array has been passed, fill it in with values. */
+ /* If subpatterns array has been passed, fill it in with values. */
if (subpats != NULL) {
/* Try to get the list of substrings and display a warning if failed. */
if (pcre_get_substring_list((*subject)->value.str.val,
@@ -716,6 +716,9 @@ char *php_pcre_replace(char *regex, int regex_len,
*walkbuf = '\0';
/* increment the result length by how much we've added to the string */
*result_len += walkbuf - (result + *result_len);
+
+ if (limit != -1)
+ limit--;
}
} else { /* Failed to match */
/* If we previously set PCRE_NOTEMPTY after a null match,
@@ -752,9 +755,6 @@ char *php_pcre_replace(char *regex, int regex_len,
/* Advance to the next piece. */
start_offset = offsets[1];
-
- if (limit != -1)
- limit--;
}
efree(offsets);