diff options
Diffstat (limited to 'src/stream.c')
| -rw-r--r-- | src/stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream.c b/src/stream.c index 4f20455..edee6a7 100644 --- a/src/stream.c +++ b/src/stream.c @@ -17,7 +17,7 @@ eninit_stream(int status, struct stream *stream) size_t n; char *p = NULL, *w, *h, *f, *end; - for (stream->ptr = 0; p;) { + for (stream->ptr = 0; stream->fd >= 0 && p;) { r = read(stream->fd, stream->buf + stream->ptr, sizeof(stream->buf) - stream->ptr); if (r < 0) enprintf(status, "read %s:", stream->file); |
