moriyoshi Tue Feb 18 10:22:46 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/standard file.c
Log:
MFH(r1.307): Fixed bug #21689
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.279.2.8 php4/ext/standard/file.c:1.279.2.9
--- php4/ext/standard/file.c:1.279.2.8 Fri Jan 24 05:00:18 2003
+++ php4/ext/standard/file.c Tue Feb 18 10:22:46 2003
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.279.2.8 2003/01/24 10:00:18 sniper Exp $ */
+/* $Id: file.c,v 1.279.2.9 2003/02/18 15:22:46 moriyoshi Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -2181,7 +2181,7 @@
lineEnd = emalloc(len + 1);
bptr = buf;
tptr = buf + strlen(buf) -1;
- while ( isspace((int) *tptr) && (*tptr!=delimiter) && (tptr > bptr) ) tptr--;
+ while ( isspace((int)*(unsigned char *)tptr) && (*tptr!=delimiter) && (tptr >
+bptr) ) tptr--;
tptr++;
strcpy(lineEnd, tptr);
@@ -2203,7 +2203,7 @@
do {
/* 1. Strip any leading space */
- while(isspace((int) *bptr) && (*bptr!=delimiter)) bptr++;
+ while(isspace((int)*(unsigned char *)bptr) && (*bptr!=delimiter))
+bptr++;
/* 2. Read field, leaving bptr pointing at start of next field */
if (enclosure && *bptr == enclosure) {
bptr++; /* move on to first character in field */
@@ -2252,7 +2252,7 @@
temp = erealloc(temp, temp_len+1);
bptr = buf;
tptr = buf + strlen(buf) -1;
- while (isspace((int) *tptr) &&
(*tptr!=delimiter) && (tptr > bptr))
+ while (isspace((int)*(unsigned char
+*)tptr) && (*tptr!=delimiter) && (tptr > bptr))
tptr--;
tptr++;
strcpy(lineEnd, tptr);
@@ -2273,7 +2273,7 @@
if (strlen(temp)) {
tptr--;
- while (isspace((int)*tptr) && (*tptr!=delimiter))
+ while (isspace((int)*(unsigned char *)tptr) &&
+(*tptr!=delimiter))
*tptr-- = 0; /* strip any trailing spaces */
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php