aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-09-27 14:51:43 -0400
committerRob Austein <sra@hactrn.net>2016-09-27 14:51:43 -0400
commita9c0ad1888b7c7a94d46ded4a39dfb6cb3bbcb90 (patch)
tree3321e1bcff4dbc2ab36f9701a96413c80101086a
parent5e127578f0c68ee9baa67d867d75c6a714bd1176 (diff)
Fix swapped memmove() arguments in hal_ks_index_replace().
-rw-r--r--ks_index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ks_index.c b/ks_index.c
index 476faf9..5aae516 100644
--- a/ks_index.c
+++ b/ks_index.c
@@ -238,7 +238,7 @@ hal_error_t hal_ks_index_replace(hal_ks_index_t *ksi,
const size_t len = (ksi->size - ksi->used - 1) * sizeof(*ksi->index);
const uint16_t b = ksi->index[ksi->used];
- memmove(&ksi->index[ksi->used + 1], &ksi->index[ksi->used], len);
+ memmove(&ksi->index[ksi->used], &ksi->index[ksi->used + 1], len);
ksi->index[ksi->size - 1] = ksi->index[where];
ksi->index[where] = b;