src/linked_list.c

changeset 1433
81c301a59b7c
parent 1429
6e0c3a8a914a
child 1435
48ebf22b698e
--- a/src/linked_list.c	Mon Oct 20 19:44:18 2025 +0200
+++ b/src/linked_list.c	Mon Oct 20 20:10:36 2025 +0200
@@ -752,7 +752,9 @@
     // we can add the remaining nodes and immediately advance to the inserted node
     const char *source = array;
     for (size_t i = 1; i < n; i++) {
-        source += list->collection.elem_size;
+        if (source != NULL) {
+            source += list->collection.elem_size;
+        }
         if (0 != cx_ll_insert_at(list, node, source)) return i;
         node = CX_LL_PTR(node, ll->loc_next);
     }

mercurial