summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-04-07 05:00:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-10 10:00:07 +0200
commit6da43a09a93773f877b27a0857db858fd636f18f (patch)
treeb39e6221ecc827ba6c3f5e16e61046144c3fc3ca
parentc13477bbdb457ef55fd793706b05c9883badad32 (diff)
downloadbarebox-6da43a09a93773f877b27a0857db858fd636f18f.tar.gz
menu: fix double action when "\n\r" or "\r\n" is received
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/menu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/menu.c b/common/menu.c
index fd21e52..e85a320 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -296,7 +296,7 @@ int menu_show(struct menu *m)
do {
if (m->auto_select >= 0)
- ch = KEY_ENTER;
+ ch = KEY_RETURN;
else
ch = getc();
@@ -339,7 +339,6 @@ int menu_show(struct menu *m)
m->selected->action(m, m->selected);
print_menu_entry(m, m->selected, 1);
break;
- case KEY_ENTER:
case KEY_RETURN:
clear();
gotoXY(1,1);