diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sorted_array.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sorted_array.c b/src/sorted_array.c index e841380..7d5358b 100644 --- a/src/sorted_array.c +++ b/src/sorted_array.c @@ -130,6 +130,7 @@ zix_sorted_array_index_unchecked(const ZixSortedArray* a, size_t index) return (char*)a->array + (a->elem_size * index); } +ZIX_API void* zix_sorted_array_index(const ZixSortedArray* a, size_t index) { @@ -155,7 +156,7 @@ zix_sorted_array_find(const ZixSortedArray* a, intptr_t upper = a->num_elems - 1; while (upper >= lower) { const size_t i = lower + ((upper - lower) / 2); - void* elem_i = zix_sorted_array_index(a, i); + void* elem_i = zix_sorted_array_index_unchecked(a, i); const int cmp = a->cmp(elem_i, e, a->cmp_data); if (cmp == 0) { |