summaryrefslogtreecommitdiff
path: root/package/busybox/busybox-1.16.0-wc.patch
blob: 5116fe23f703392a5a3d827c80039a6af5ed37e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
diff -urpN busybox-1.16.0/coreutils/wc.c busybox-1.16.0-wc/coreutils/wc.c
--- busybox-1.16.0/coreutils/wc.c	2010-03-08 22:49:32.000000000 +0100
+++ busybox-1.16.0-wc/coreutils/wc.c	2010-03-08 22:51:29.310086707 +0100
@@ -88,6 +88,8 @@ int wc_main(int argc UNUSED_PARAM, char 
 	if (!argv[0]) {
 		*--argv = (char *) bb_msg_standard_input;
 		fname_fmt = "\n";
+	}
+	if (!argv[1]) { /* zero or one filename? */
 		if (!((print_type-1) & print_type)) /* exactly one option? */
 			start_fmt = "%"COUNT_FMT;
 	}