Fix Y/n prompt

This commit is contained in:
Phillip Stephens 2015-09-01 14:10:29 -07:00
parent 99c006629c
commit 112368c903
1 changed files with 3 additions and 3 deletions

View File

@ -165,9 +165,9 @@ public:
HECL::Printf(_S("\nContinue? (Y/n) ")); HECL::Printf(_S("\nContinue? (Y/n) "));
#else #else
if (XTERM_COLOR) if (XTERM_COLOR)
HECL::Printf(_S("\n" BLUE BOLD "Continue?" NORMAL " (Y/N) ")); HECL::Printf(_S("\n" BLUE BOLD "Continue?" NORMAL " (Y/n) "));
else else
HECL::Printf(_S("\nContinue? (Y/N) ")); HECL::Printf(_S("\nContinue? (Y/n) "));
#endif #endif
int ch; int ch;
@ -184,7 +184,7 @@ public:
{ {
if (ch == 'n' || ch == 'N') if (ch == 'n' || ch == 'N')
return 0; return 0;
if (ch == 'y' || ch == 'Y' || ch == 13) if (ch == 'y' || ch == 'Y' || ch == '\r' || ch == '\n')
break; break;
} }
#ifndef _WIN32 #ifndef _WIN32