cvs: /php4/ext/pcre php_pcre.c
| From: | Andrei Zmievski | Date: | Fri, 19 Nov 1999 22:59:44 +0000 |
| Subject: | cvs: /php4/ext/pcre php_pcre.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6540@lists.php.net to get a copy of this message | ||
andrei Fri Nov 19 17:59:44 1999 EDT
Modified files:
/php4/ext/pcre php_pcre.c
Log:
(PHP preg_replace) Fixed a bug that cause backreferences to lose
their value after the first occurrence.
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.27 php4/ext/pcre/php_pcre.c:1.28
--- php4/ext/pcre/php_pcre.c:1.27 Fri Nov 19 17:28:06 1999
+++ php4/ext/pcre/php_pcre.c Fri Nov 19 17:59:12 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.27 1999/11/19 22:28:06 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.28 1999/11/19 22:59:12 andrei Exp $ */
/*
TODO:
@@ -719,7 +719,7 @@
backref < count) {
match_len = offsets[(backref<<1)+1] - offsets[backref<<1];
memcpy (walkbuf,
- piece + offsets[backref<<1],
+ subject + offsets[backref<<1],
match_len);
walkbuf += match_len;
walk += (backref > 9) ? 3 : 2;