diff --git a/core/slice/sort_private.odin b/core/slice/sort_private.odin index 7148b1297..54a92d986 100644 --- a/core/slice/sort_private.odin +++ b/core/slice/sort_private.odin @@ -74,10 +74,10 @@ _stable_sort_general :: proc(data: $T/[]$E, call: $P, $KIND: Sort_Kind) where (O n := len(data) for n > 0 { - half := n / 2 - mid := from + half + half := n / 2 + mid := from + half - if less(value, data[mid], call) { + if less(value, data[mid], call) { n = half } else { from = mid + 1