From: Simon Tatham Date: Tue, 9 May 2000 08:56:30 +0000 (+0000) Subject: Ahem. This time high-half characters really _do_ work in username X-Git-Tag: 0.49~13 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=229245f384da3def70d16268cf4693d6c2304136;p=PuTTY.git Ahem. This time high-half characters really _do_ work in username and password... [originally from svn r468] --- diff --git a/ssh.c b/ssh.c index 9ab57809..a91190ec 100644 --- a/ssh.c +++ b/ssh.c @@ -500,7 +500,8 @@ static void ssh_protocol(unsigned char *in, int inlen, int ispkt) { exit(0); break; default: - if (((c >= ' ' && c <= '~') || (c >= 160)) && pos < 40) { + if (((c >= ' ' && c <= '~') || + ((unsigned char)c >= 160)) && pos < 40) { username[pos++] = c; c_write(&c, 1); } @@ -584,7 +585,8 @@ static void ssh_protocol(unsigned char *in, int inlen, int ispkt) { exit(0); break; default: - if (((c >= ' ' && c <= '~') || (c >= 160)) && pos < 40) + if (((c >= ' ' && c <= '~') || + ((unsigned char)c >= 160)) && pos < 40) password[pos++] = c; break; }