From 13276810b1b892d4aad62e2362e00afbe654b5b2 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 14 Dec 2022 00:04:52 +0100 Subject: Fix unix istream eof flag Propperly set the parent eof flag and not a local one that isn't accessed at all. Signed-off-by: David Oberhollenzer --- lib/io/unix/istream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/io/unix/istream.c b/lib/io/unix/istream.c index 5898141..e0b728c 100644 --- a/lib/io/unix/istream.c +++ b/lib/io/unix/istream.c @@ -10,7 +10,6 @@ typedef struct { istream_t base; char *path; int fd; - bool eof; sqfs_u8 buffer[BUFSZ]; } file_istream_t; @@ -27,7 +26,7 @@ static int file_precache(istream_t *strm) ret = read(file->fd, strm->buffer + strm->buffer_used, diff); if (ret == 0) { - file->eof = true; + strm->eof = true; break; } -- cgit v1.2.3