diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-22 06:05:02 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-22 06:05:02 +0200 |
commit | 8a33679694b0fdf459d69868f85c081cab5687cb (patch) | |
tree | be6d2ea8d9a5132d82939892736d2531877632e8 /shell/hush.c | |
parent | 1e811b12317d0eab4e78d848caa640cca497a0a7 (diff) | |
download | busybox-w32-8a33679694b0fdf459d69868f85c081cab5687cb.tar.gz busybox-w32-8a33679694b0fdf459d69868f85c081cab5687cb.tar.bz2 busybox-w32-8a33679694b0fdf459d69868f85c081cab5687cb.zip |
hush: fix "hush -c 'echo $#'" showing -1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index 41d5fcab2..7645a34a4 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -7080,7 +7080,6 @@ int hush_main(int argc, char **argv) | |||
7080 | /* -c 'script' (no params): prevent empty $0 */ | 7080 | /* -c 'script' (no params): prevent empty $0 */ |
7081 | G.global_argv--; /* points to argv[i] of 'script' */ | 7081 | G.global_argv--; /* points to argv[i] of 'script' */ |
7082 | G.global_argv[0] = argv[0]; | 7082 | G.global_argv[0] = argv[0]; |
7083 | G.global_argc--; | ||
7084 | } /* else -c 'script' ARG0 [ARG1...]: $0 is ARG0 */ | 7083 | } /* else -c 'script' ARG0 [ARG1...]: $0 is ARG0 */ |
7085 | init_sigmasks(); | 7084 | init_sigmasks(); |
7086 | parse_and_run_string(optarg); | 7085 | parse_and_run_string(optarg); |