commit | 004baba2d6857a3cc0c5d25020ec257169a2d2b7 | [log] [tgz] |
---|---|---|
author | Denis Vlasenko <vda.linux@googlemail.com> | Sun May 20 22:22:18 2007 +0000 |
committer | Denis Vlasenko <vda.linux@googlemail.com> | Sun May 20 22:22:18 2007 +0000 |
tree | 2d96ca56349fe8400e44f7f07dd33e2e2f908c1b | |
parent | 262d7653514f2b94c3aea4dac31b09e46b8b1c15 [diff] [blame] |
hush: fix shift + $0 bug; add testcase
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 @@ 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;