diff options
author | Sean Anderson <seanga2@gmail.com> | 2021-02-28 16:29:51 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-12 17:17:11 -0400 |
commit | 9539f71675c40485e448efb3c4e06afc8d102f94 (patch) | |
tree | e4a3d2be937c6593a057e8a8a077645f2af09d40 /common | |
parent | c146de48727da66ea7dc43f12bd41814cff2faa8 (diff) | |
download | u-boot-9539f71675c40485e448efb3c4e06afc8d102f94.zip u-boot-9539f71675c40485e448efb3c4e06afc8d102f94.tar.gz u-boot-9539f71675c40485e448efb3c4e06afc8d102f94.tar.bz2 |
hush: Fix assignments being misinterpreted as commands
If there were no variable substitutions in a command, then initial
assignments would be misinterpreted as commands, instead of being skipped
over. This is demonstrated by the following example:
=> foo=bar echo baz
Unknown command 'foo=bar' - try 'help'
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cli_hush.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cli_hush.c b/common/cli_hush.c index 9466651..6cff3b1 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -1673,7 +1673,7 @@ static int run_pipe_real(struct pipe *pi) return -1; } /* Process the command */ - return cmd_process(flag, child->argc, child->argv, + return cmd_process(flag, child->argc - i, child->argv + i, &flag_repeat, NULL); #endif } |