shell: Fix command completion logic
The original code (introduced by commit d5db35204a
) looked like this
before the last rewrite/cleanup:
if (default_module != -1) {
return (str == NULL) ? dest : -1;
}
However with the cleanup the logic seems to have gotten reversed.
Fixes #8501
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
c63363711d
commit
b26ca13672
1 changed files with 1 additions and 1 deletions
|
@ -494,7 +494,7 @@ static struct shell_module *get_completion_module(char *str,
|
|||
*/
|
||||
str = strchr(str, ' ');
|
||||
if (default_module) {
|
||||
return str ? dest : NULL;
|
||||
return str ? NULL : dest;
|
||||
}
|
||||
|
||||
if (!str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue