diff options
Diffstat (limited to 'src/byte_source.c')
-rw-r--r-- | src/byte_source.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/byte_source.c b/src/byte_source.c index 397ea6d7..7a839875 100644 --- a/src/byte_source.c +++ b/src/byte_source.c @@ -8,6 +8,7 @@ #include "serd/node.h" #include "serd/string_view.h" +#include <assert.h> #include <stdbool.h> #include <stdint.h> #include <string.h> @@ -46,7 +47,10 @@ serd_byte_source_open_source(SerdByteSource* const source, const SerdNode* const name, const size_t page_size) { + assert(read_func); + assert(error_func); assert(page_size > 0); + memset(source, '\0', sizeof(*source)); source->read_func = read_func; source->error_func = error_func; |