cvs: php4 /ext/standard string.c

From: Date: Fri, 21 Jul 2000 15:29:59 +0000
Subject: cvs: php4 /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-834@lists.php.net to get a copy of this message
andrei Fri Jul 21 08:29:59 2000 EDT Modified files: /php4/ext/standard string.c Log: (php_addslashes) Fixed stop condition - it should only take into account the length of the string, not the characters. Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.138 php4/ext/standard/string.c:1.139 --- php4/ext/standard/string.c:1.138 Thu Jul 20 16:08:26 2000 +++ php4/ext/standard/string.c Fri Jul 21 08:29:59 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.138 2000/07/20 23:08:26 hholzgra Exp $ */ +/* $Id: string.c,v 1.139 2000/07/21 15:29:59 andrei Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1706,7 +1706,8 @@ return str; } new_str = (char *) emalloc((length?length:(length=strlen(str)))*2+1); - for (source=str,end=source+length,target=new_str; (c = *source) || source<end; source++) { + for (source=str,end=source+length,target=new_str; source<end; source++) { + c = *source; switch(c) { case '\0': *target++ = '\\';

« previous php.cvs (#834) next »