Fix argument parsing.

This commit is contained in:
Matt Kraai 2000-07-14 06:47:33 +00:00
parent d6912c97de
commit b870af09ae
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ int wc_main(int argc, char **argv)
}
wc_file(file, *argv);
} else {
while (argc-- > 0 && *argv != '\0' && strlen(*argv)) {
while (argc-- > 0) {
file = fopen(*argv, "r");
if (file == NULL) {
perror(*argv);

2
wc.c
View File

@ -154,7 +154,7 @@ int wc_main(int argc, char **argv)
}
wc_file(file, *argv);
} else {
while (argc-- > 0 && *argv != '\0' && strlen(*argv)) {
while (argc-- > 0) {
file = fopen(*argv, "r");
if (file == NULL) {
perror(*argv);