cvs: php4 /ext/pcre php_pcre.c
| From: | Andrei Zmievski | Date: | Thu, 24 Aug 2000 13:23:13 +0000 |
| Subject: | cvs: php4 /ext/pcre php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1359@lists.php.net to get a copy of this message | ||
andrei Thu Aug 24 06:23:13 2000 EDT
Modified files:
/php4/ext/pcre php_pcre.c
Log:
@- Fixed a bug that did not respect limit parameter in preg_replace() when
@ using /e modifier. (Andrei)
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.65 php4/ext/pcre/php_pcre.c:1.66
--- php4/ext/pcre/php_pcre.c:1.65 Thu Aug 17 12:01:28 2000
+++ php4/ext/pcre/php_pcre.c Thu Aug 24 06:23:13 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.65 2000/08/17 19:01:28 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.66 2000/08/24 13:23:13 andrei Exp $ */
/*
TODO:
@@ -720,10 +720,11 @@
*walkbuf = '\0';
/* increment the result length by how much we've added to the string */
*result_len += walkbuf - (result + *result_len);
-
- if (limit != -1)
- limit--;
}
+
+ if (limit != -1)
+ limit--;
+
} else { /* Failed to match */
/* If we previously set PCRE_NOTEMPTY after a null match,
this is not necessarily the end. We need to advance