Should've been printing to stdout. flag is file?

This commit is contained in:
Gitea 2020-12-11 04:47:00 -06:00
parent 0219a96d6c
commit 35a7640155
1 changed files with 1 additions and 0 deletions

1
tee.c
View File

@ -52,6 +52,7 @@ int main(int argc, char * argv[]) {
}
while((c = getchar()) != EOF) {
putchar(c);
for(j = 0; files[j] != 0 && j < 27; j++) {
if(fputc(c, files[j]) == EOF) {
file_failed = 1;