andrzej-kaczmarek commented on a change in pull request #1347: sys/shell: Fix
command parameters completion
URL: https://github.com/apache/mynewt-core/pull/1347#discussion_r212565440
##########
File path: sys/shell/src/shell.c
##########
@@ -470,6 +470,11 @@ get_command_from_module(const char *command, int len, int
module)
shell_module = &shell_modules[module];
for (i = 0; shell_module->commands[i].sc_cmd; i++) {
+
+ if (strlen(shell_module->commands[i].sc_cmd) != len) {
Review comment:
discussed offline: `command` is not null-terminated thus need for `strncmp`
below
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services