diff options
author | Rob Austein <sra@hactrn.net> | 2016-09-27 14:51:43 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-09-27 14:51:43 -0400 |
commit | a9c0ad1888b7c7a94d46ded4a39dfb6cb3bbcb90 (patch) | |
tree | 3321e1bcff4dbc2ab36f9701a96413c80101086a | |
parent | 5e127578f0c68ee9baa67d867d75c6a714bd1176 (diff) |
Fix swapped memmove() arguments in hal_ks_index_replace().
-rw-r--r-- | ks_index.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |