Ahem. This time high-half characters really _do_ work in username

and password...

[originally from svn r468]
This commit is contained in:
Simon Tatham 2000-05-09 08:56:30 +00:00
Родитель 5f93b919ac
Коммит 229245f384
1 изменённых файлов: 4 добавлений и 2 удалений

6
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;
}