cvs: php4 /ext/standard string.c

From: Date: Mon, 06 Nov 2000 19:41:31 +0000
Subject: cvs: php4 /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2504@lists.php.net to get a copy of this message
andrei Mon Nov 6 11:41:31 2000 EDT Modified files: /php4/ext/standard string.c Log: Fix bug #7667. Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.163 php4/ext/standard/string.c:1.164 --- php4/ext/standard/string.c:1.163 Wed Oct 11 18:26:26 2000 +++ php4/ext/standard/string.c Mon Nov 6 11:41:30 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.163 2000/10/12 01:26:26 sas Exp $ */ +/* $Id: string.c,v 1.164 2000/11/06 19:41:30 andrei Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1270,7 +1270,9 @@ if (f < 0) { f = 0; } - } + } else if (f > (int)(*str)->value.str.len) + f = (int)(*str)->value.str.len; + /* if "length" position is negative, set it to the length * needed to stop that many chars from the end of the string @@ -1280,10 +1282,6 @@ if (l < 0) { l = 0; } - } - - if (f >= (int)(*str)->value.str.len) { - RETURN_STRINGL((*str)->value.str.val, (*str)->value.str.len, 1); } if((f+l) > (int)(*str)->value.str.len) {

« previous php.cvs (#2504) next »