From dfb579e50973d6499ebdc0ecc64e347b9064fb97 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 6 Feb 2018 09:47:30 -0200 Subject: [PATCH] shared/shell: Fix not checking mandatory arguments Even if mandatory argument takes is of variable size it should still be checked if at least one argument has been provided. --- src/shared/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/shell.c b/src/shared/shell.c index 2958a66b5..30c1dfde1 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -285,7 +285,7 @@ static int cmd_exec(const struct bt_shell_menu_entry *entry, } /* Check if there are enough arguments */ - if ((unsigned) argc - 1 < w.we_wordc && !w.we_offs) { + if ((unsigned) argc - 1 < w.we_wordc) { print_text(COLOR_HIGHLIGHT, "Missing %s argument", w.we_wordv[argc - 1]); goto fail; -- 2.47.3