Fri, 01 Nov 2024 18:17:19 +0100
add assertion that triggers when cx_array_copy() stops working for NULL arrays
src/array_list.c | file | annotate | diff | comparison | revisions |
--- a/src/array_list.c Fri Nov 01 18:16:32 2024 +0100 +++ b/src/array_list.c Fri Nov 01 18:17:19 2024 +0100 @@ -105,6 +105,7 @@ // determine capacity size_t cap = capacity == NULL ? *size : *capacity; + assert(*target != NULL || cap == 0); // check if resize is required size_t minsize = index + elem_count;