cvs: /php3/functions string.c

From: Date: Tue, 07 Dec 1999 08:19:41 +0000
Subject: cvs: /php3/functions string.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-13487@lists.php.net to get a copy of this message
thies Tue Dec 7 03:19:41 1999 EDT Modified files: /php3/functions string.c Log: (explode) fixed newly introduced bug (them shall check twice *before* committing!) Index: php3/functions/string.c diff -u php3/functions/string.c:1.204 php3/functions/string.c:1.205 --- php3/functions/string.c:1.204 Tue Dec 7 01:44:53 1999 +++ php3/functions/string.c Tue Dec 7 03:19:41 1999 @@ -30,7 +30,7 @@ */ -/* $Id: string.c,v 1.204 1999/12/07 06:44:53 thies Exp $ */ +/* $Id: string.c,v 1.205 1999/12/07 08:19:41 thies Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif @@ -301,13 +301,15 @@ if (p2 == NULL) { add_index_stringl(return_value, i++, p1, str->value.str.len, 1); - } else do { - add_index_stringl(return_value, i++, p1, p2-p1, 1); - p1 = p2 + delim->value.str.len; - } while (p2 = _php3_memnstr(p1, delim->value.str.val, delim->value.str.len, endp)); + } else { + do { + add_index_stringl(return_value, i++, p1, p2-p1, 1); + p1 = p2 + delim->value.str.len; + } while (p2 = _php3_memnstr(p1, delim->value.str.val, delim->value.str.len, endp)); - if (p1 <= endp) { - add_index_stringl(return_value, i++, p1, endp-p1, 1); + if (p1 <= endp) { + add_index_stringl(return_value, i++, p1, endp-p1, 1); + } } }

« previous php.dev (#13487) next »