aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/list.c b/src/list.c
index a1261d0..b719cf0 100644
--- a/src/list.c
+++ b/src/list.c
@@ -48,7 +48,7 @@ void list_remove(struct list *list, size_t index)
return;
}
- memmove(&list->items[index], &list->items[index + 1], list->len - index);
+ memmove(&list->items[index], &list->items[index + 1], sizeof(void*) * (list->len - index));
list->len -= 1;
}
@@ -61,7 +61,7 @@ void list_insert(struct list *list, size_t index, void *item)
index = list->len;
}
- memmove(&list->items[index + 1], &list->items[index], list->len - index);
+ memmove(&list->items[index + 1], &list->items[index], sizeof(void*) * (list->len - index));
list->items[index] = item;
list->len += 1;
}