iliaa Mon Dec 15 13:53:27 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/standard/tests/file bug26634.phpt test4.csv
Modified files: /php-src/ext/standard file.c Log: Fixed bug #26634 & added test case. Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.279.2.45 php-src/ext/standard/file.c:1.279.2.46 --- php-src/ext/standard/file.c:1.279.2.45 Fri Dec 12 20:44:24 2003 +++ php-src/ext/standard/file.c Mon Dec 15 13:53:25 2003 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.279.2.45 2003/12/13 01:44:24 iliaa Exp $ */ +/* $Id: file.c,v 1.279.2.46 2003/12/15 18:53:25 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2266,16 +2266,17 @@ array_init(return_value); -#define CSV_ADD_ENTRY(s, es, st) { \ - int len = es - st; \ - if (len) { \ - while (isspace((int)*(unsigned char *)s)) { \ - s++; \ - len--; \ +#define CSV_ADD_ENTRY(os, es, st) { \ + int tmp_sl = es - st; \ + char *tmp_s=os; \ + if (tmp_sl) { \ + while (isspace((int)*(unsigned char *)tmp_s)) { \ + tmp_s++; \ + tmp_sl--; \ } \ } \ - if (len) { \ - add_next_index_stringl(return_value, s, len, 1); \ + if (tmp_sl) { \ + add_next_index_stringl(return_value, tmp_s, tmp_sl, 1); \ } else { \ add_next_index_string(return_value, "", 1); \ } \ Index: php-src/ext/standard/tests/file/bug26634.phpt +++ php-src/ext/standard/tests/file/bug26634.phpt Index: php-src/ext/standard/tests/file/test4.csv +++ php-src/ext/standard/tests/file/test4.csv -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php