From 46c3adc82b2aacbb487cffc1d376349637848c60 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Fri, 16 Sep 2016 20:58:31 +0200 Subject: [PATCH] compare error in shell parser fixed --- source/firmware/kernel/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/firmware/kernel/shell.c b/source/firmware/kernel/shell.c index 1a66456..c25d489 100644 --- a/source/firmware/kernel/shell.c +++ b/source/firmware/kernel/shell.c @@ -30,7 +30,7 @@ static void parse(const char *buffer, unsigned int len) struct list_node *it = shell_object.command_list.front; while(it != NULL) { 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); return; }