diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-11-14 18:04:19 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-11-14 18:04:19 +0100 |
commit | d7852457e1d9eafb4b0a6e93c3e26070420c45a1 (patch) | |
tree | 39bf999145dbb62f6ca08581bc3fbe05cccc989b | |
parent | 64eb693f2acada6823e640e73a6fb95c74a0a6ee (diff) | |
download | arr-d7852457e1d9eafb4b0a6e93c3e26070420c45a1.tar.gz arr-d7852457e1d9eafb4b0a6e93c3e26070420c45a1.tar.xz arr-d7852457e1d9eafb4b0a6e93c3e26070420c45a1.zip |
Off-by-one
-rw-r--r-- | arr.c | 2 |
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 *)); |