From 4ae6e8d5b1488ac97eb1dd9ab1d300e6a35a4e51 Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Sat, 22 Apr 2023 16:11:51 -0700 Subject: [PATCH] Messed up list resizing, forgot to multiply allocated amount by the sizeof(void*). --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 6d810ae..c840925 100644 --- a/src/util.c +++ b/src/util.c @@ -102,7 +102,7 @@ void list_resize(struct List *list) { return; list->allocated *= 2; - list->data = realloc(list->data, list->allocated); + list->data = realloc(list->data, sizeof(void*) * list->allocated); } char *string_create(const char *fmt, ...) {