1
0
mirror of git://git.suckless.org/sbase synced 2024-12-24 16:02:54 +00:00

tail: allow tail -n 0 or tail -0

fix a crash, but allow this option.
This commit is contained in:
Hiltjo Posthuma 2015-03-30 21:24:46 +02:00
parent d583d12300
commit d6aff89bbb
2 changed files with 3 additions and 1 deletions

3
tail.c
View File

@ -106,6 +106,9 @@ main(int argc, char *argv[])
usage();
} ARGEND;
if (!num)
return 0;
if (!argc)
tail(stdin, "<stdin>");
else {

1
tr.c
View File

@ -39,7 +39,6 @@ static struct range *set2 = NULL;
static size_t set2ranges = 0;
static int (*set2check)(Rune) = NULL;
static size_t
rangelen(struct range r)
{