summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2014-03-29 14:50:04 +0800
committerBernard Xiong <[email protected]>2014-03-29 14:50:04 +0800
commita82ad3e380a0511ae5acaf5cce84bef42c624b65 (patch)
treeececc6be6093e1a66281977d37c10eea1576a543 /components
parent7d2b7199d8d82848f621d0493540b13c9d9841e9 (diff)
parent0979328fb1f7ab43c92b418bdb5111e1b828e301 (diff)
Merge pull request #250 from grissiom/msh-next
[msh] don't complain on empty command
Diffstat (limited to 'components')
-rw-r--r--components/finsh/msh.c3
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)