Merge branch 'fix/shell_cmd_compare' into 'develop'

compare error in shell parser fixed



See merge request !37
This commit is contained in:
tkl 2016-09-16 19:01:09 +00:00
commit 083190bea7

View File

@ -30,7 +30,7 @@ static void parse(const char *buffer, unsigned int len)
struct list_node *it = shell_object.command_list.front; struct list_node *it = shell_object.command_list.front;
while(it != NULL) { while(it != NULL) {
struct command *cmd = (struct command *)it->data; struct command *cmd = (struct command *)it->data;
if(strstr(buffer, cmd->command)) { if(0 == strncmp(buffer, cmd->command, strlen(cmd->command))) {
cmd->command_callback(buffer); cmd->command_callback(buffer);
return; return;
} }