fix(msh): Fixed command identification errors.
1.Originally, "strncmp" was used, and the length was command length, and when the input was the same as the length of the command, the condition was passed incorrectly, causing a problem (feedback from "下一站 还是站").
This commit is contained in:
@@ -235,7 +235,7 @@ MR_INLINE void msh_parse_cmd(void)
|
||||
for (const struct mr_msh_cmd *msh_cmd = ((&_mr_msh_cmd_start) + 1);
|
||||
msh_cmd < &_mr_msh_cmd_end;
|
||||
msh_cmd++) {
|
||||
if (strncmp(msh_cmd->name, msh.buf, strlen(msh_cmd->name)) != 0) {
|
||||
if (strcmp(msh_cmd->name, msh.buf) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user