diff options
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 1a67157b..210e638e 100644 --- a/src/byte_source.c +++ b/src/byte_source.c @@ -29,6 +29,7 @@ serd_byte_source_page(SerdByteSource* source) ? SERD_ERR_UNKNOWN : SERD_FAILURE); } else if (n_read < source->page_size) { source->file_buf[n_read] = '\0'; + source->buf_size = n_read; } return SERD_SUCCESS; } @@ -47,6 +48,7 @@ serd_byte_source_open_source(SerdByteSource* source, source->stream = stream; source->from_stream = true; source->page_size = page_size; + source->buf_size = page_size; source->cur = cur; source->error_func = error_func; source->read_func = read_func; |