commit 3167ff8ee94cbaae373f1febb9cac0aad2759ed3
parent 026025a79f15dbcc3864999a21061885bccc74a8
Author: bsandro <brian.drosan@gmail.com>
Date: Fri, 24 Dec 2021 13:02:18 +0200
util.c checks
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/common/util.c b/common/util.c
@@ -26,6 +26,7 @@ struct array_t array_copy(struct array_t *array) {
}
void array_expand(struct array_t *array) {
+ assert(array != NULL);
size_t new_cap = array->cap * 2;
array->data = realloc(array->data, array->elem_size * new_cap);
assert(array->data != NULL);