`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
72edb22b8a0e1e62216b59a045147d1a863ad59b #15638
Closes #15642
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;