]> granicus.if.org Git - php/commitdiff
fixed a problem that ereg_replace() couldn't match with line stand/end marker.
authorRui Hirokawa <hirokawa@php.net>
Sat, 4 May 2002 11:20:12 +0000 (11:20 +0000)
committerRui Hirokawa <hirokawa@php.net>
Sat, 4 May 2002 11:20:12 +0000 (11:20 +0000)
ext/ereg/ereg.c
ext/standard/reg.c

index 02e39e401feaf58888060f56691c2fd4ba5c5a7b..0335347b396521ea404825567cc44e37b83958d0 100644 (file)
@@ -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,
index 02e39e401feaf58888060f56691c2fd4ba5c5a7b..0335347b396521ea404825567cc44e37b83958d0 100644 (file)
@@ -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,