From 7d71ad2b8589bef1bdf26c3cfec5ab99b6bba3b9 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 27 May 2024 12:51:57 -0400 Subject: update last operation after flushing, reopening, or setting file position --- src/stdio/freopen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stdio/freopen.c') diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c index f2238ff9..f23d53af 100644 --- a/src/stdio/freopen.c +++ b/src/stdio/freopen.c @@ -107,6 +107,7 @@ FILE * freopen(const char * restrict filename, const char * restrict mode, FILE stream->text = !(strchr(mode, 'b')); stream->read = ((openmode & O_RDONLY) == O_RDONLY) || ((openmode & O_RDWR) == O_RDWR); stream->write = ((openmode & O_WRONLY) == O_WRONLY) || ((openmode & O_RDWR) == O_RDWR); + stream->operation = OP_NONE; /* RETURN_SUCCESS(ARGUMENT(stream)); -- cgit v1.2.1