mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 22:58:52 +00:00
Merge pull request #4550
0e33cf89
password: fix secure input with echo on windows (moneromooo-monero)
This commit is contained in:
commit
40980b33b7
@ -60,7 +60,7 @@ namespace
|
||||
|
||||
DWORD mode_old;
|
||||
::GetConsoleMode(h_cin, &mode_old);
|
||||
DWORD mode_new = mode_old & ~((hide_input ? ENABLE_ECHO_INPUT : 0) | ENABLE_LINE_INPUT);
|
||||
DWORD mode_new = mode_old & ~(hide_input ? ENABLE_ECHO_INPUT : 0);
|
||||
::SetConsoleMode(h_cin, mode_new);
|
||||
|
||||
bool r = true;
|
||||
@ -78,7 +78,11 @@ namespace
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (ucs2_ch == L'\n' || ucs2_ch == L'\r')
|
||||
else if (ucs2_ch == L'\r')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (ucs2_ch == L'\n')
|
||||
{
|
||||
std::cout << std::endl;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user