fix that cxKvListInsert() did not lose the sorted property

Wed, 24 Sep 2025 23:52:36 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 24 Sep 2025 23:52:36 +0200
changeset 1393
461d256e32c6
parent 1392
30c20aac31b6
child 1394
7b23c6db9500

fix that cxKvListInsert() did not lose the sorted property

relates to #461

src/kv_list.c file | annotate | diff | comparison | revisions
--- a/src/kv_list.c	Wed Sep 24 23:51:04 2025 +0200
+++ b/src/kv_list.c	Wed Sep 24 23:52:36 2025 +0200
@@ -650,6 +650,9 @@
 }
 
 int cx_kv_list_insert(CxList *list, size_t index, CxHashKey key, void *value) {
+    // assume we are losing the sorted property
+    list->collection.sorted = false;
+
     cx_kv_list *kv_list = (cx_kv_list*)list;
 
     // reserve memory in the map

mercurial