aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-12 09:40:50 +0100
committerMattias Andrée <maandree@kth.se>2017-01-12 09:40:50 +0100
commit6bcf1120ccde684a7ab09fd690931ce125fe4631 (patch)
treee951aaf2b740c284f7c5c12d3bfe26f66d86727f /src/stream.c
parentAdd vu-to-text (diff)
downloadblind-6bcf1120ccde684a7ab09fd690931ce125fe4631.tar.gz
blind-6bcf1120ccde684a7ab09fd690931ce125fe4631.tar.bz2
blind-6bcf1120ccde684a7ab09fd690931ce125fe4631.tar.xz
Add vu-from-text
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/stream.c')
-rw-r--r--src/stream.c2
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);