From 36189e8a3c3e12a0163aff71b1581a7ae5ccdb91 Mon Sep 17 00:00:00 2001 From: Richard Thier Date: Fri, 30 Jun 2023 16:39:56 +0200 Subject: [PATCH] hopefully fixing internal quicksorts? --- thiersort.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) */