about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-11-14 18:04:19 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-11-14 18:04:19 +0100
commitd7852457e1d9eafb4b0a6e93c3e26070420c45a1 (patch)
tree39bf999145dbb62f6ca08581bc3fbe05cccc989b
parent64eb693f2acada6823e640e73a6fb95c74a0a6ee (diff)
downloadarr-d7852457e1d9eafb4b0a6e93c3e26070420c45a1.tar.gz
arr-d7852457e1d9eafb4b0a6e93c3e26070420c45a1.tar.xz
arr-d7852457e1d9eafb4b0a6e93c3e26070420c45a1.zip
Off-by-one
-rw-r--r--arr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arr.c b/arr.c
index 1a52845..552cbf4 100644
--- a/arr.c
+++ b/arr.c
@@ -261,7 +261,7 @@ usage:
 	char **arglist = argv + optind;  // starts counting at 1
 
 	// default to stdin when no file arguments are given
-	if (argnum == 0)
+	if (argnum <= 1)
 		stdins++;
 
 	FILE **files = calloc(argnum+stdins, sizeof (FILE *));