From 60a4cd1c9a592f62017b07f840eb9033020fa28b Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Wed, 22 Jul 2015 01:22:28 +0200 Subject: [PATCH] Just a newline on the quit [confirm] prompt should not quit. That is just too easy to type by accident. Only accept y, Y and EOF (EOF for when there is an error). --- src/klh10.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/klh10.c b/src/klh10.c index 09e4d4a..e4fe129 100644 --- a/src/klh10.c +++ b/src/klh10.c @@ -599,11 +599,9 @@ fc_quit(struct cmd_s *cm) printf("Are you sure you want to quit? [Confirm]"); fe_ctycmforce(); switch (cminchar()) { - case '\r': - case '\n': case 'y': case 'Y': - case -1: /* EOF */ + case EOF: /* EOF */ break; default: /* Anything else prevents quit */ return;