main: Fix file creation bug

This commit is contained in:
lat9nq 2023-05-28 01:53:55 -04:00
parent e359040558
commit e2eec38882

View File

@ -129,7 +129,7 @@ int main(int argc, char *argv[]) {
f = STDOUT_FILENO;
if (argc > 2) {
filename = argv[2];
f = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
f = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0664);
if (f == -1) {
const int err = errno;