Browse Source

Merge pull request #2765 from Despacito696969/master

Commit `a040be9` but for `core:sort`
Jeroen van Rijn 2 years ago
parent
commit
fdb538538a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/sort/sort.odin

+ 1 - 1
core/sort/sort.odin

@@ -259,7 +259,7 @@ _quick_sort :: proc(it: Interface, a, b, max_depth: int) {
 
 
 	a, b, max_depth := a, b, max_depth
 	a, b, max_depth := a, b, max_depth
 
 
-	if b-a > 12 { // only use shell sort for lengths <= 12
+	for b-a > 12 { // only use shell sort for lengths <= 12
 		if max_depth == 0 {
 		if max_depth == 0 {
 			heap_sort(it, a, b)
 			heap_sort(it, a, b)
 			return
 			return