From 106d6a77cee883ddfef9f1a8e7fb9546e53bc08c Mon Sep 17 00:00:00 2001 From: Rui Hirokawa Date: Sun, 5 May 2002 08:39:57 +0000 Subject: [PATCH] fixed problem that ereg_replace() couldn't match with line stand/end marker. --- ext/ereg/ereg.c | 2 +- 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, -- 2.50.1