summaryrefslogtreecommitdiff
path: root/common/cmd_nvedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r--common/cmd_nvedit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 3fd8abc..52c5e7c 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -848,6 +848,9 @@ static int do_env (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *cp;
+ if (argc < 2)
+ return cmd_usage(cmdtp);
+
/* drop initial "env" arg */
argc--;
argv++;