aboutsummaryrefslogtreecommitdiff
path: root/ks_index.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-10-15 15:21:01 -0400
committerRob Austein <sra@hactrn.net>2016-10-15 15:21:01 -0400
commit534f465c5934c53c8f330e5f6227cc918151169f (patch)
tree3fdc1b0f558b364e42b4849e5a3f00805ccfa8bf /ks_index.c
parent46e73ec4d2bb235a4905a21feb33705b696edf5f (diff)
Fencepost error in ks_heapsort().
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);
}
}