CVS update: php4/ext/standard

From: Date: Mon, 21 Jun 1999 23:07:47 +0000
Subject: CVS update: php4/ext/standard
Groups: php.version4 
Request: Send a blank email to php-version4+get-1636@lists.php.net to get a copy of this message
Date: Monday June 21, 1999 @ 19:07 Author: andrey Update of /repository/php4/ext/standard In directory php:/tmp/cvs-serv12783/ext/standard Modified Files: reg.c Log Message: Backing out changes. Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.14 php4/ext/standard/reg.c:1.15 --- php4/ext/standard/reg.c:1.14 Wed Jun 9 11:02:57 1999 +++ php4/ext/standard/reg.c Mon Jun 21 19:07:46 1999 @@ -28,7 +28,7 @@ | Jaakko Hyvätti <jaakko@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.14 1999/06/09 15:02:57 andrey Exp $ */ +/* $Id: reg.c,v 1.15 1999/06/21 23:07:46 andrey Exp $ */ #include <stdio.h> #include "php.h" @@ -561,7 +561,7 @@ } /* churn through str, generating array entries as we go */ - while ((count == -1 || count > 0) && !(err = regexec(&re, strp, 1, subs, 0))) { + while ((count == -1 || count > 1) && !(err = regexec(&re, strp, 1, subs, 0))) { if (subs[0].rm_so == 0 && subs[0].rm_eo) { /* match is at start of string, return empty string */ add_next_index_stringl(return_value, empty_string, 0, 1); @@ -604,11 +604,9 @@ } /* otherwise we just have one last element to add to the array */ - if (count == -1 || err==REG_NOMATCH) { - size = endp - strp; + size = endp - strp; - add_next_index_stringl(return_value, strp, size, 1); - } + add_next_index_stringl(return_value, strp, size, 1); regfree(&re);

« previous php.version4 (#1636) next »