Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2003-03-11 12:30:31 +0300
committerSimon Tatham <anakin@pobox.com>2003-03-11 12:30:31 +0300
commit73203bce79d1dc40cb037fc58438582192b9ad85 (patch)
treefd17e22a1de05fc7513d5840b536556d2949f05f /ldisc.c
parent43fe7d3c877ce96a7cd9a601f8b62f78fa4ac876 (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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldisc.c b/ldisc.c
index d569f112..91af0aca 100644
--- a/ldisc.c
+++ b/ldisc.c
@@ -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;