From: Rui Hirokawa Date: Sun, 5 May 2002 08:39:57 +0000 (+0000) Subject: fixed problem that ereg_replace() couldn't match with line stand/end marker. X-Git-Tag: php-4.2.1RC2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=106d6a77cee883ddfef9f1a8e7fb9546e53bc08c;p=php fixed problem that ereg_replace() couldn't match with line stand/end marker. --- 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,