src/array_list.c

changeset 1658
71aa6e28a2d7
parent 1657
c6a0381ab9b7
--- a/src/array_list.c	Mon Dec 22 16:45:58 2025 +0100
+++ b/src/array_list.c	Mon Dec 22 16:59:48 2025 +0100
@@ -1077,7 +1077,8 @@
     list->capacity = initial_capacity;
 
     // allocate the array after the real elem_size is known
-    list->data = cxCalloc(allocator, initial_capacity, elem_size);
+    list->data = cxCalloc(allocator, initial_capacity,
+        list->base.collection.elem_size);
     if (list->data == NULL) { // LCOV_EXCL_START
         cxFree(allocator, list);
         return NULL;

mercurial