fixes cx_linked_list_add not recalculating end

Mon, 08 Feb 2021 00:20:52 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 08 Feb 2021 00:20:52 +0100
changeset 408
dfdd571550f8
parent 407
b447539ec255
child 409
5d167af0eadb

fixes cx_linked_list_add not recalculating end

src/linked_list.c file | annotate | diff | comparison | revisions
--- a/src/linked_list.c	Mon Feb 08 00:18:09 2021 +0100
+++ b/src/linked_list.c	Mon Feb 08 00:20:52 2021 +0100
@@ -69,6 +69,9 @@
 
     void **next = CX_LL_PTR(last, loc_next);
     *next = new_node;
+    if (end != NULL) {
+        *end = cx_linked_list_last(&new_node, NULL, loc_next);
+    }
     if (loc_prev >= 0) {
         void **prev = CX_LL_PTR(new_node, loc_prev);
         *prev = last;

mercurial