diff --git a/cmdline/stream.c b/cmdline/stream.c index 8cd32d9b..1b56b9a8 100644 --- a/cmdline/stream.c +++ b/cmdline/stream.c @@ -231,8 +231,9 @@ static int sfill(STREAM* s) /* LCOV_EXCL_STOP */ } - /* if we reached the end, doesn't try to read */ + /* expose the logical size boundary as EOF, just like EOF from the underlying file */ if (s->offset >= s->size) { + s->state = STREAM_STATE_EOF; return EOF; }