summaryrefslogtreecommitdiff
path: root/package/busybox/patches/000-upstream-hush.patch
blob: 1e038bf99f4ac07b9d95086801faa3d9179a5843 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -6944,7 +6944,7 @@ int hush_main(int argc, char **argv)
 				/* -c 'script' (no params): prevent empty $0 */
 				G.global_argv--; /* points to argv[i] of 'script' */
 				G.global_argv[0] = argv[0];
-				G.global_argc--;
+				G.global_argc++;
 			} /* else -c 'script' ARG0 [ARG1...]: $0 is ARG0 */
 			init_sigmasks();
 			parse_and_run_string(optarg);