they're not special control characters processed by the line input
routines.
git-svn-id: svn://svn.tartarus.org/sgt/putty@1116
cda61777-01e9-0310-a592-
d414129be87e
break;
default:
if (((c >= ' ' && c <= '~') ||
break;
default:
if (((c >= ' ' && c <= '~') ||
- ((unsigned char) c >= 160)) && pos < 40) {
+ ((unsigned char) c >= 160))
+ && pos < sizeof(username)-1) {
username[pos++] = c;
c_write(&c, 1);
}
username[pos++] = c;
c_write(&c, 1);
}
- if (((c >= ' ' && c <= '~') ||
- ((unsigned char) c >= 160))
- && pos < sizeof(password))
+ if (pos < sizeof(password)-1)
password[pos++] = c;
break;
}
password[pos++] = c;
break;
}
break;
default:
if (((c >= ' ' && c <= '~') ||
break;
default:
if (((c >= ' ' && c <= '~') ||
- ((unsigned char) c >= 160)) && pos < 40) {
+ ((unsigned char) c >= 160))
+ && pos < sizeof(username)-1) {
username[pos++] = c;
c_write(&c, 1);
}
username[pos++] = c;
c_write(&c, 1);
}
- if (((c >= ' ' && c <= '~') ||
- ((unsigned char) c >= 160))
- && pos < 40)
+ if (pos < sizeof(password)-1)
password[pos++] = c;
break;
}
password[pos++] = c;
break;
}