Преглед изворни кода

Merge pull request #250 from grissiom/msh-next

[msh] don't complain on empty command
Bernard Xiong пре 11 година
родитељ
комит
a82ad3e380
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      components/finsh/msh.c

+ 3 - 0
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)