fix off-by-one bug, pointed out by Michael Bell

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1827 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
nils 2004-07-12 15:19:28 +00:00
parent 82ec09e92b
commit 78d32814a1
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ char *getpass(const char *prompt)
fputs(prompt, stderr);
fflush(stderr);
for (i = 0; i < sizeof(buf); i++) {
for (i = 0; i < sizeof(buf) - 1; i++) {
buf[i] = _getch();
if (buf[i] == '\r')
break;