Fix two more instances where the check for "-" is insufficient

This commit is contained in:
sin
2014-11-18 21:57:54 +00:00
parent 148e6e3b79
commit 4399f35448
2 changed files with 3 additions and 3 deletions

2
comm.c
View File

@@ -41,7 +41,7 @@ main(int argc, char *argv[])
usage();
for (i = 0; i < LEN(fp); i++) {
if (argv[i][0] == '-')
if (argv[i][0] == '-' && !argv[i][1])
argv[i] = "/dev/fd/0";
if (!(fp[i] = fopen(argv[i], "r")))
eprintf("fopen %s:", argv[i]);