diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-08 21:48:28 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-10 18:56:50 +0000 |
commit | e1016bce1414e213a83f119d4db98f579f78d104 (patch) | |
tree | 18cbeea7bc837014cd4840207f95810a5c38b701 | |
parent | Merge pull request #5509 (diff) | |
download | monero-e1016bce1414e213a83f119d4db98f579f78d104.tar.xz |
password: do not use line input on windows
This keeps its builtin command editing away
Thanks iDunk for testing on Windows
-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; } |