diff options
author | Rui Hirokawa <hirokawa@php.net> | 2002-05-05 08:39:57 +0000 |
---|---|---|
committer | Rui Hirokawa <hirokawa@php.net> | 2002-05-05 08:39:57 +0000 |
commit | 106d6a77cee883ddfef9f1a8e7fb9546e53bc08c (patch) | |
tree | b51ee36a91d021a50fe32dd05879f5fd64d1074c | |
parent | d10a337f00884bee05754fecb75bdd3ea8f85a74 (diff) | |
download | php-git-106d6a77cee883ddfef9f1a8e7fb9546e53bc08c.tar.gz |
fixed problem that ereg_replace() couldn't match with line stand/end marker.
-rw-r--r-- | ext/ereg/ereg.c | 2 | ||||
-rw-r--r-- | ext/standard/reg.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index 6fff6a5352..ef29cae84d 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -371,7 +371,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha && subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1 /* this next case shouldn't happen. it does. */ - && subs[walk[1] - '0'].rm_so < subs[walk[1] - '0'].rm_eo) { + && subs[walk[1] - '0'].rm_so <= subs[walk[1] - '0'].rm_eo) { tmp = subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; memcpy (walkbuf, diff --git a/ext/standard/reg.c b/ext/standard/reg.c index 6fff6a5352..ef29cae84d 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -371,7 +371,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha && subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1 /* this next case shouldn't happen. it does. */ - && subs[walk[1] - '0'].rm_so < subs[walk[1] - '0'].rm_eo) { + && subs[walk[1] - '0'].rm_so <= subs[walk[1] - '0'].rm_eo) { tmp = subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; memcpy (walkbuf, |