added lf to Win32 getpass_r() so that next output appears in new line.

This commit is contained in:
Gunter Knauf 2007-07-20 16:01:05 +00:00
parent 94fcb4b09d
commit 594fc0411e
1 changed files with 2 additions and 0 deletions

View File

@ -115,6 +115,8 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
previous one as well */
i = i - (i>=1?2:1);
}
/* since echo is disabled, print a newline */
fputs("\n", stderr);
/* if user didn't hit ENTER, terminate buffer */
if (i==buflen)
buffer[buflen-1]=0;