From 6bcf1120ccde684a7ab09fd690931ce125fe4631 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 12 Jan 2017 09:40:50 +0100 Subject: Add vu-from-text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stream.c') 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); -- cgit v1.2.3-70-g09d2