From 87d05ed28a3d479932c0c4d0dc8013ecf9baa24c Mon Sep 17 00:00:00 2001 From: Paul Fenwick Date: Tue, 21 Feb 2017 15:11:26 +1300 Subject: [PATCH] TS-32: Exit on Ctrl-D on non-readline systems. --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 6357f6a..88c2043 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,7 +84,10 @@ const std::string getResponse (const std::string& prompt) std::cout << prompt; std::getline (std::cin, response); if (std::cin.eof () == 1) + { + response = ""; std::cout << "\n"; + } #endif return response;