This commit is contained in:
Scott Anderson 2017-05-13 12:56:36 +12:00
parent a2896f33a4
commit f4c90635ff
9 changed files with 20 additions and 19 deletions

View file

@ -211,7 +211,7 @@ ssize_t list_lsearch(const list_t *list, int compare(const void *key, const void
uint8_t (*array)[size] = list->items;
for (size_t i = 0; i < list->length; ++i) {
if (compare(key, &array[i]) == 0) {
if (compare(&key, &array[i]) == 0) {
if (ret) {
memcpy(ret, &array[i], size);
}