diff --git a/src/client/Main.cpp b/src/client/Main.cpp index 010e284..ed858c6 100644 --- a/src/client/Main.cpp +++ b/src/client/Main.cpp @@ -397,6 +397,11 @@ SessionSelectionResult selectSession(const std::string& ClientID, std::cout << "\nChoose 1-" << QuitChoice << ": "; std::cin >> UserChoice; + if (std::cin.eof()) + { + UserChoice = QuitChoice; + break; + } std::cin.clear(); std::cin.ignore(std::numeric_limits::max(), '\n'); if (UserChoice == 0 || UserChoice > QuitChoice)