From a343fb171df0820e0607d864a1c099dab43a869a Mon Sep 17 00:00:00 2001 From: Despacito696969 Date: Tue, 7 Jun 2022 14:07:19 +0200 Subject: [PATCH] Fixed `slice.is_sorted_cmp` --- core/slice/sort.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/slice/sort.odin b/core/slice/sort.odin index 8a2dec039..b6e455056 100644 --- a/core/slice/sort.odin +++ b/core/slice/sort.odin @@ -103,7 +103,7 @@ is_sorted_by :: proc(array: $T/[]$E, less: proc(i, j: E) -> bool) -> bool { is_sorted_by_cmp :: is_sorted_cmp is_sorted_cmp :: proc(array: $T/[]$E, cmp: proc(i, j: E) -> Ordering) -> bool { for i := len(array)-1; i > 0; i -= 1 { - if cmp(array[i], array[i-1]) == .Equal { + if cmp(array[i], array[i-1]) == .Less { return false } }