]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Ahem. This time high-half characters really _do_ work in username
authorSimon Tatham <anakin@pobox.com>
Tue, 9 May 2000 08:56:30 +0000 (08:56 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 9 May 2000 08:56:30 +0000 (08:56 +0000)
and password...

[originally from svn r468]

ssh.c

diff --git a/ssh.c b/ssh.c
index 9ab57809062450b6b7c8d6f0509833cc11ed5290..a91190ec5aacb2fc061f5e0fb67d4035f4148795 100644 (file)
--- 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;
            }