diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-06-07 16:58:10 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-06-07 16:58:10 -0400 |
commit | 35af37a3688a7e33c89c78c3ba9f16826270030b (patch) | |
tree | 27a08f5a10cb173466b4e92c7e50e5d14faf6035 | |
parent | c96fdcfef5159ee4e7084fda4e3ae04c4c0e6daf (diff) |
set eof at EOF
-rw-r--r-- | src/stdio/getc_unlocked.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stdio/getc_unlocked.c b/src/stdio/getc_unlocked.c index 13c9f867..dccbc2e4 100644 --- a/src/stdio/getc_unlocked.c +++ b/src/stdio/getc_unlocked.c @@ -25,6 +25,7 @@ int getc_unlocked(FILE * stream) if (read(stream->fd, &c, sizeof(c)) != 1) { stream->err = 1; + stream->eof = 1; return EOF; } |