aboutsummaryrefslogtreecommitdiff
path: root/ks_index.c
diff options
context:
space:
mode:
Diffstat (limited to 'ks_index.c')
-rw-r--r--ks_index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ks_index.c b/ks_index.c
index edfc7fa..40238db 100644
--- a/ks_index.c
+++ b/ks_index.c
@@ -141,7 +141,7 @@ static inline void ks_heapsort(hal_ks_index_t *ksi)
const uint16_t tmp = ksi->index[i];
ksi->index[i] = ksi->index[0];
ksi->index[0] = tmp;
- ks_heapsift(ksi, 0, i);
+ ks_heapsift(ksi, 0, i - 1);
}
}