From cecdae448e88603c98d7d079855c992be6df739f Mon Sep 17 00:00:00 2001 From: Nikolay Nechaev Date: Sun, 18 Oct 2020 19:25:43 +0300 Subject: [PATCH] Update td_example.cpp (#1254) Read the whole password, not only the first word from it --- example/cpp/td_example.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/cpp/td_example.cpp b/example/cpp/td_example.cpp index 962be64c2..1b8d7859f 100644 --- a/example/cpp/td_example.cpp +++ b/example/cpp/td_example.cpp @@ -257,7 +257,7 @@ class TdExample { [this](td_api::authorizationStateWaitPassword &) { std::cout << "Enter authentication password: " << std::flush; std::string password; - std::cin >> password; + std::getline(std::cin, line); send_query(td_api::make_object(password), create_authentication_query_handler()); },