Skip to content

Commit 2c2b23a

Browse files
committed
Ensure that format is known before parsing
1 parent cd37ef7 commit 2c2b23a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/binsparse/read_matrix.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ bsp_matrix_t bsp_read_matrix_from_group(hid_t f) {
3131

3232
bsp_matrix_format_t format = bsp_get_matrix_format(format_string);
3333

34+
assert(format != 0);
35+
3436
matrix.format = format;
3537

3638
cJSON* nnz_ = cJSON_GetObjectItemCaseSensitive(binsparse, "nnz");

0 commit comments

Comments
 (0)