diff --git a/thiersort.h b/thiersort.h index 797de2f..9f52e68 100644 --- a/thiersort.h +++ b/thiersort.h @@ -581,7 +581,7 @@ static inline void ts_quicksort_inplace( /* Just simple recursion for now */ ts_quicksort_inplace(arr, from, left, lt, reent_data); - ts_quicksort_inplace(arr, left, to, lt, reent_data); + ts_quicksort_inplace(arr, left + 1, to, lt, reent_data); } /** @@ -622,7 +622,7 @@ static inline void ts_quicksort_fromto( /* Can use inplace steps from now on */ ts_quicksort_inplace(dst, from, li, lt, reent_data); - ts_quicksort_inplace(dst, li, to, lt, reent_data); + ts_quicksort_inplace(dst, li + 1, to, lt, reent_data); } /** Internal code reuse (type-branches should be optimized out) */