mirror of
https://github.com/curl/curl.git
synced 2026-08-25 21:03:34 +03:00
Luck Call made win32 password prompting support backspace
This commit is contained in:
parent
4a4295290d
commit
9e80356dd5
3 changed files with 10 additions and 1 deletions
|
|
@ -203,6 +203,11 @@ char *getpass_r(const char *prompt, char *buffer, int buflen)
|
|||
buffer[i] = 0;
|
||||
break;
|
||||
}
|
||||
else
|
||||
if ( buffer[i] == '\b')
|
||||
/* remove this letter and if this is not the first key, remove the
|
||||
previous one as well */
|
||||
i = i - (i>=1?2:1);
|
||||
}
|
||||
/* if user didn't hit ENTER, terminate buffer */
|
||||
if (i==buflen)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue