summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2016-12-18 23:19:18 +0100
committerpgen <p.gen.progs@gmail.com>2016-12-18 23:25:13 +0100
commitd1cd68bee7e745f10c3d35238cde418cf3151314 (patch)
treef6a4452dc3a6d0ddbadeb90d1ba717306917dbe5
parent37417951db5d152a548abd767b495ce236a237ac (diff)
Ignore EOF when a scancode contains an escape sequence.
-rw-r--r--smenu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/smenu.c b/smenu.c
index 3c2763a..285ed99 100644
--- a/smenu.c
+++ b/smenu.c
@@ -2802,6 +2802,10 @@ get_scancode(unsigned char * s, int max)
/* Restore the save terminal parameters */
/* """""""""""""""""""""""""""""""""""" */
tcsetattr(0, TCSADRAIN, &original_ts);
+
+ /* Ignore EOF when a scancode contains an escape sequence. */
+ /* """"""""""""""""""""""""""""""""""""""""""""""""""""""" */
+ clearerr(stdin);
}
return i;