diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-05-15 16:06:58 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-05-15 16:06:58 +0200 |
commit | 5e80b3c3ef10e8a9c33d73131d56db12b8824b43 (patch) | |
tree | 7846238dd2b6ef14b72af1202fe6fc0e8b6def22 | |
parent | Merge pull request #5538 (diff) | |
parent | password: do not use line input on windows (diff) | |
download | monero-5e80b3c3ef10e8a9c33d73131d56db12b8824b43.tar.xz |
Merge pull request #5535
e1016bce password: do not use line input on windows (moneromooo-monero)
-rw-r--r-- | src/common/password.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/common/password.cpp b/src/common/password.cpp index 03d13db42..33e1f48fd 100644 --- a/src/common/password.cpp +++ b/src/common/password.cpp @@ -57,7 +57,7 @@ namespace DWORD mode_old; ::GetConsoleMode(h_cin, &mode_old); - DWORD mode_new = mode_old & ~(hide_input ? ENABLE_ECHO_INPUT : 0); + DWORD mode_new = mode_old & ~((hide_input ? ENABLE_ECHO_INPUT : 0) | ENABLE_LINE_INPUT); ::SetConsoleMode(h_cin, mode_new); bool r = true; @@ -77,10 +77,6 @@ namespace } else if (ucs2_ch == L'\r') { - continue; - } - else if (ucs2_ch == L'\n') - { std::cout << std::endl; break; } |