diff options
| author | Grissiom <[email protected]> | 2014-03-29 11:33:20 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2014-03-29 11:33:20 +0800 |
| commit | 0979328fb1f7ab43c92b418bdb5111e1b828e301 (patch) | |
| tree | 3b8366439a29c1f435ac8d49efdb1980a1c00f57 | |
| parent | 96d9fd8715985908762edf0f82a0847a06f918e4 (diff) | |
[msh] don't complain on empty command
Just branch out and no complain on command length == 0;
| -rw-r--r-- | components/finsh/msh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/finsh/msh.c b/components/finsh/msh.c index 354f884913..1492e017e1 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) |
