From: Andrei Zmievski Date: Fri, 21 Jul 2000 15:29:59 +0000 (+0000) Subject: (php_addslashes) Fixed stop condition - it should only take into account X-Git-Tag: PRE_FILE_COMPILE_API_CHANGE~209 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbced1b9cc50b839a0214352ee77391c533ac08f;p=php (php_addslashes) Fixed stop condition - it should only take into account the length of the string, not the characters. --- diff --git a/ext/standard/string.c b/ext/standard/string.c index dd761f1da0..c8217b8ace 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1706,7 +1706,8 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f 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