aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-06-01 14:57:52 +0000
committerChristopher Faylor <me@cgf.cx>2001-06-01 14:57:52 +0000
commitbb8251474cd5eaf5950a51e6b13dc6d5098ed0aa (patch)
treeab016d5603cdbd5701f7ee93f6d73558f0419351
parentbc28fe9599383f9d8996c6e8ec2e564503836b71 (diff)
downloadnewlib-bb8251474cd5eaf5950a51e6b13dc6d5098ed0aa.zip
newlib-bb8251474cd5eaf5950a51e6b13dc6d5098ed0aa.tar.gz
newlib-bb8251474cd5eaf5950a51e6b13dc6d5098ed0aa.tar.bz2
* path.cc (chdir): Really make sure that isspace gets only an unsigned char.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index def2b30..da4d721 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jun 1 10:57:19 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * path.cc (chdir): Really make sure that isspace gets only an unsigned
+ char.
+
Fri Jun 1 13:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (_rename): Handle the case that `foo' is renamed to
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 3138841..21df976 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2897,7 +2897,7 @@ chdir (const char *dir)
whitespace to SetCurrentDirectory. This doesn't work too well
with other parts of the API, though, apparently. So nuke trailing
white space. */
- for (s = strchr (dir, '\0'); --s >= dir && isspace ((unsigned int) *s); )
+ for (s = strchr (dir, '\0'); --s >= dir && isspace ((unsigned int) (*s & 0xff)); )
*s = '\0';
if (path.error)