diff --git a/schwab_sort.h b/schwab_sort.h index d7a2130..fa745d3 100644 --- a/schwab_sort.h +++ b/schwab_sort.h @@ -114,7 +114,7 @@ inline void sch_insertion_sort(uint32_t *arr, int low, int high) { /* Dual heapsort5 probably helps insertion speed */ /* This is sane, because insertion benefits from */ /* data being "basically nearly sorted" as input */ - if(high + 1 - low > 10) { + if(high - low > 10) { sch_hsort5(&arr[0]); sch_hsort5(&arr[5]); }