From 0979328fb1f7ab43c92b418bdb5111e1b828e301 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Sat, 29 Mar 2014 11:33:20 +0800 Subject: [PATCH] [msh] don't complain on empty command Just branch out and no complain on command length == 0; --- components/finsh/msh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/finsh/msh.c b/components/finsh/msh.c index 354f88491..1492e017e 100644 --- a/components/finsh/msh.c +++ b/components/finsh/msh.c @@ -292,6 +292,9 @@ int msh_exec(char* cmd, rt_size_t length) length--; } + if (length == 0) + return 0; + /* Exec sequence: * 1. built-in command * 2. module(if enabled) -- GitLab