summaryrefslogtreecommitdiffstats
path: root/commands/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/menu.c')
-rw-r--r--commands/menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/menu.c b/commands/menu.c
index f734db3874..7b8e8bec58 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -202,7 +202,7 @@ static int do_menu_select(struct cmd_menu *cm)
return -EINVAL;
}
- if (!menu_set_selected(m, cm->num)) {
+ if (menu_set_selected(m, cm->num) < 0) {
eprintf("Entry '%d' not found\n", cm->num);
return -EINVAL;
}