diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tail.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tail.c b/src/tail.c index e69470c24..c91b8d83f 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1624,10 +1624,13 @@ main (int argc, char **argv) --n_units; } - n_files = argc - optind; - file = argv + optind; - if (n_files == 0) + if (optind < argc) + { + n_files = argc - optind; + file = argv + optind; + } + else { static char *dummy_stdin = "-"; n_files = 1; |