From a6297b8a2c24adc5aa6dcd03cdc766368cda898d Mon Sep 17 00:00:00 2001 From: srs5694 Date: Sun, 25 Mar 2012 16:13:16 -0400 Subject: Fix Ctrl+D problems; 0.8.4 release --- gpttext.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gpttext.cc') diff --git a/gpttext.cc b/gpttext.cc index 2f30356..506c0f1 100644 --- a/gpttext.cc +++ b/gpttext.cc @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include "attributes.h" @@ -509,12 +510,12 @@ void GPTDataTextUI::MainMenu(string filename) { int goOn = 1; PartType typeHelper; uint32_t temp1, temp2; - + do { cout << "\nCommand (? for help): "; switch (ReadString()[0]) { case '\0': - goOn = !cin.eof(); + goOn = cin.good(); break; case 'b': case 'B': cout << "Enter backup filename to save: "; @@ -610,7 +611,7 @@ void GPTDataTextUI::RecoveryMenu(string filename) { cout << "\nRecovery/transformation command (? for help): "; switch (ReadString()[0]) { case '\0': - goOn = !cin.eof(); + goOn = cin.good(); break; case 'b': case 'B': RebuildMainHeader(); @@ -736,6 +737,7 @@ void GPTDataTextUI::ExpertsMenu(string filename) { cout << "\nExpert command (? for help): "; switch (ReadString()[0]) { case '\0': + goOn = cin.good(); break; case 'a': case 'A': if (GetPartRange(&temp1, &temp2) > 0) -- cgit v1.2.1