diff options
author | Simon Tatham <anakin@pobox.com> | 2003-03-11 12:30:31 +0300 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2003-03-11 12:30:31 +0300 |
commit | 73203bce79d1dc40cb037fc58438582192b9ad85 (patch) | |
tree | fd17e22a1de05fc7513d5840b536556d2949f05f /ldisc.c | |
parent | 43fe7d3c877ce96a7cd9a601f8b62f78fa4ac876 (diff) |
Never pass a `char' to a ctype function. I had relied on gcc -Wall
letting me know about instances of this, but it turns out that my
ctype.h explicitly casts input values to `int' to evade the
`subscript has type char' warning, so it had been carefully not
letting me know! Found them all by compiling with a doctored
ctype.h, and hopefully fixed them all too.
[originally from svn r2927]
Diffstat (limited to 'ldisc.c')
-rw-r--r-- | ldisc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -164,8 +164,8 @@ void ldisc_send(void *handle, char *buf, int len, int interactive) bsb(ldisc, plen(ldisc, ldisc->buf[ldisc->buflen - 1])); ldisc->buflen--; if (ldisc->buflen > 0 && - isspace(ldisc->buf[ldisc->buflen - 1]) && - !isspace(ldisc->buf[ldisc->buflen])) + isspace((unsigned char)ldisc->buf[ldisc->buflen-1]) && + !isspace((unsigned char)ldisc->buf[ldisc->buflen])) break; } break; |