1
0
forked from bonsai/harakit

cat(1p): fixed write buffering

This commit is contained in:
Emma Tebibyte 2023-08-10 15:34:02 -06:00
parent b360b823ac
commit e530f10cd5
Signed by untrusted user: emma
GPG Key ID: 6D661C738815E7DD

View File

@ -107,7 +107,7 @@ int main(int argc, char *argv[]) {
} }
} }
fputs(buf, stdout); fwrite(buf, 1, p, stdout);
fflush(stdout); fflush(stdout);
if (file != stdin) { fclose(file); } if (file != stdin) { fclose(file); }