fix typo bug in cxListDifference() - resolves #745 default tip

Thu, 30 Oct 2025 19:27:18 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 30 Oct 2025 19:27:18 +0100
changeset 1463
e228b5bde7f6
parent 1462
9263d3f15379

fix typo bug in cxListDifference() - resolves #745

src/list.c file | annotate | diff | comparison | revisions
--- a/src/list.c	Thu Oct 30 19:26:47 2025 +0100
+++ b/src/list.c	Thu Oct 30 19:27:18 2025 +0100
@@ -868,8 +868,8 @@
 
     // first, remove existing items from dst when needed
     if (cxCollectionSorted(dst) && cxCollectionSorted(subtrahend)) {
-        CxIterator sub_iter = cxListIterator(dst);
         CxIterator dst_iter = cxListIterator(dst);
+        CxIterator sub_iter = cxListIterator(subtrahend);
         while (cxIteratorValid(dst_iter) && cxIteratorValid(sub_iter)) {
             void *dst_elem = cxIteratorCurrent(dst_iter);
             void *sub_elem = cxIteratorCurrent(sub_iter);

mercurial