From 81ca927cec8b0a8fb2f52d7e0ca638a8a5fabd38 Mon Sep 17 00:00:00 2001 From: rod Date: Wed, 18 Oct 2023 22:17:42 -0400 Subject: [PATCH] fix: changed sizeof() argument --- data_structures/dynamic_array/dynamic_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_structures/dynamic_array/dynamic_array.c b/data_structures/dynamic_array/dynamic_array.c index 19631cb1d1..a4fb1987a7 100644 --- a/data_structures/dynamic_array/dynamic_array.c +++ b/data_structures/dynamic_array/dynamic_array.c @@ -17,7 +17,7 @@ void *add(dynamic_array_t *da, const void *value) if (da->size >= da->capacity) { void **newItems = - realloc(da->items, (da->capacity <<= 1) * sizeof(void **)); + realloc(da->items, (da->capacity <<= 1) * sizeof(void *)); da->items = newItems; }