Skip to content

Commit b7cfc04

Browse files
committed
Fixed assertion in mpack_reader_init_data for the case when data are NULL.
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
1 parent a2d7202 commit b7cfc04

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mpack/mpack-reader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void mpack_reader_init_error(mpack_reader_t* reader, mpack_error_t error) {
5555
}
5656

5757
void mpack_reader_init_data(mpack_reader_t* reader, const char* data, size_t count) {
58-
mpack_assert(data != NULL, "data is NULL");
58+
mpack_assert(count == 0 || data != NULL, "data is NULL for %u bytes", count);
5959

6060
mpack_memset(reader, 0, sizeof(*reader));
6161
reader->data = data;

0 commit comments

Comments
 (0)