client/cmdparser.c: Remove the leading spaces before calling the subparser. client/cmdlfhid.c: Modify accordingly.

This commit is contained in:
izsh@fail0verflow.com 2010-03-06 00:30:24 +00:00
parent f443ff3ebc
commit 035303ac5f
2 changed files with 6 additions and 3 deletions

View file

@ -50,9 +50,12 @@ void CmdsParse(const command_t Commands[], const char *Cmd)
if(matches == 1) i=last_match;
}
if (Commands[i].Name)
if (Commands[i].Name) {
while (Cmd[len] == ' ')
++len;
Commands[i].Parse(Cmd + len);
else
} else {
// show help (always first in array) for selected hierarchy or if command not recognised
CmdsHelp(Commands);
}
}