diff options
author | Denis Vlasenko | 2007-05-20 22:22:18 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-05-20 22:22:18 +0000 |
commit | 004baba2d6857a3cc0c5d25020ec257169a2d2b7 (patch) | |
tree | 2d96ca56349fe8400e44f7f07dd33e2e2f908c1b /shell/hush.c | |
parent | 262d7653514f2b94c3aea4dac31b09e46b8b1c15 (diff) | |
download | busybox-004baba2d6857a3cc0c5d25020ec257169a2d2b7.zip busybox-004baba2d6857a3cc0c5d25020ec257169a2d2b7.tar.gz |
hush: fix shift + $0 bug; add testcase
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index 0d260a7..107b821 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -952,7 +952,7 @@ static int builtin_shift(char **argv) n = atoi(argv[1]); } if (n >= 0 && n < global_argc) { - /* XXX This probably breaks $0 */ + global_argv[n] = global_argv[0]; global_argc -= n; global_argv += n; return EXIT_SUCCESS; |