mirror of
https://github.com/curl/curl.git
synced 2026-07-27 06:37:16 +03:00
tool_getpass: replace getch() call with _getch() on Windows
`getch()` is deprecated according to MSDN:
https://learn.microsoft.com/cpp/c-runtime-library/reference/getch
"The Microsoft-specific function name `getch` is a deprecated alias
for the `_getch` function."
Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/getch-getwch
Follow-up to 72edb22b8a #15638
Closes #15642
This commit is contained in:
parent
4341df5040
commit
7660a28093
1 changed files with 1 additions and 1 deletions
|
|
@ -102,7 +102,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
|||
fputs(prompt, tool_stderr);
|
||||
|
||||
for(i = 0; i < buflen; i++) {
|
||||
buffer[i] = (char)getch();
|
||||
buffer[i] = (char)_getch();
|
||||
if(buffer[i] == '\r' || buffer[i] == '\n') {
|
||||
buffer[i] = '\0';
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue