mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Console.c: fix "implicit declaration of function 'getch'" warning
/builds/SoftEther/SoftEtherVPN/src/Cedar/Console.c: In function 'PasswordPrompt': /builds/SoftEther/SoftEtherVPN/src/Cedar/Console.c:2051:8: warning: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration] c = getch(); ^~~~~ getc
This commit is contained in:
parent
49ed8770b8
commit
84c44fbe24
@ -2048,7 +2048,11 @@ bool PasswordPrompt(char *password, UINT size)
|
|||||||
else if (c == 0xE0)
|
else if (c == 0xE0)
|
||||||
{
|
{
|
||||||
// Read one more character
|
// Read one more character
|
||||||
|
#ifdef OS_WIN32
|
||||||
c = getch();
|
c = getch();
|
||||||
|
#else // OS_WIN32
|
||||||
|
c = getc(stdin);
|
||||||
|
#endif // OS_WIN32
|
||||||
if (c == 0x4B || c == 0x53)
|
if (c == 0x4B || c == 0x53)
|
||||||
{
|
{
|
||||||
// Backspace
|
// Backspace
|
||||||
|
Loading…
Reference in New Issue
Block a user