diff -r 3a89b31f0724 -r 943bfd9e7978 src/cx/collection.h --- a/src/cx/collection.h Thu Oct 16 19:57:47 2025 +0200 +++ b/src/cx/collection.h Fri Oct 17 14:14:21 2025 +0200 @@ -151,7 +151,7 @@ * @retval true if the elements are currently sorted wrt. the collection's compare function * @retval false if the order of elements is unknown */ -#define cxCollectionSorted(c) ((c)->collection.sorted) +#define cxCollectionSorted(c) ((c)->collection.sorted || (c)->collection.size == 0) /** * Sets a simple destructor function for this collection.