src/array_list.c

changeset 885
878a450e79bd
parent 884
d375d8056262
child 888
6f44b1f1275c
--- a/src/array_list.c	Tue Sep 17 23:11:17 2024 +0200
+++ b/src/array_list.c	Tue Sep 17 23:19:03 2024 +0200
@@ -251,7 +251,9 @@
 
     // check the first array element
     result = cmp_func(elem, array);
-    if (result <= 0) {
+    if (result < 0) {
+        return size;
+    } else if (result == 0) {
         return 0;
     }
 

mercurial