Made command parsing in CLI not treat _ as separator.

This commit is contained in:
Michael Keller 2017-02-23 09:55:58 +13:00
parent dd18d2c4ba
commit be4ad9d982
1 changed files with 1 additions and 1 deletions

View File

@ -3161,7 +3161,7 @@ static void cliMap(char *cmdline)
static char *checkCommand(char *cmdLine, const char *command) static char *checkCommand(char *cmdLine, const char *command)
{ {
if(!strncasecmp(cmdLine, command, strlen(command)) // command names match if(!strncasecmp(cmdLine, command, strlen(command)) // command names match
&& !isalnum((unsigned)cmdLine[strlen(command)])) { // next characted in bufffer is not alphanumeric (command is correctly terminated) && (isspace((unsigned)cmdLine[strlen(command)]) || cmdLine[strlen(command)] == 0)) {
return cmdLine + strlen(command) + 1; return cmdLine + strlen(command) + 1;
} else { } else {
return 0; return 0;