diff options
author | David Robillard <d@drobilla.net> | 2017-11-05 12:06:19 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-11-05 12:06:19 +0100 |
commit | 07e6a2e7d182483552b940ecdb27231d7983fd19 (patch) | |
tree | ca1cd400d13a9eaec24d9cb76725675190691cbf /src/byte_source.c | |
parent | 8aad54ea550d0d923189834f964512a9b1be927f (diff) | |
download | serd-07e6a2e7d182483552b940ecdb27231d7983fd19.tar.gz serd-07e6a2e7d182483552b940ecdb27231d7983fd19.tar.bz2 serd-07e6a2e7d182483552b940ecdb27231d7983fd19.zip |
Move EOF flag from reader to byte source
Diffstat (limited to 'src/byte_source.c')
-rw-r--r-- | src/byte_source.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/byte_source.c b/src/byte_source.c index 588d258e..8346785f 100644 --- a/src/byte_source.c +++ b/src/byte_source.c @@ -24,6 +24,7 @@ serd_byte_source_page(SerdByteSource* source) source->file_buf, 1, source->page_size, source->stream); if (n_read == 0) { source->file_buf[0] = '\0'; + source->eof = true; return (source->error_func(source->stream) ? SERD_ERR_UNKNOWN : SERD_FAILURE); } else if (n_read < source->page_size) { @@ -61,6 +62,7 @@ SerdStatus serd_byte_source_prepare(SerdByteSource* source) { if (!source->prepared) { + source->eof = false; source->prepared = true; if (source->page_size > 1) { return serd_byte_source_page(source); |