From: Rui Hirokawa Date: Sat, 4 May 2002 11:20:12 +0000 (+0000) Subject: fixed a problem that ereg_replace() couldn't match with line stand/end marker. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~260 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa1904b6e83dfd3475dc37c30a4eba71032de6ad;p=php fixed a 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 02e39e401f..0335347b39 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -372,7 +372,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 02e39e401f..0335347b39 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -372,7 +372,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,