* path.cc (chdir): Really make sure that isspace gets only an unsigned char.

This commit is contained in:
Christopher Faylor 2001-06-01 14:57:52 +00:00
parent bc28fe9599
commit bb8251474c
2 changed files with 6 additions and 1 deletions

View File

@ -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> Fri Jun 1 13:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (_rename): Handle the case that `foo' is renamed to * syscalls.cc (_rename): Handle the case that `foo' is renamed to

View File

@ -2897,7 +2897,7 @@ chdir (const char *dir)
whitespace to SetCurrentDirectory. This doesn't work too well whitespace to SetCurrentDirectory. This doesn't work too well
with other parts of the API, though, apparently. So nuke trailing with other parts of the API, though, apparently. So nuke trailing
white space. */ 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'; *s = '\0';
if (path.error) if (path.error)