Messed up list resizing, forgot to multiply allocated amount by the sizeof(void*).

このコミットが含まれているのは:
MadcowOG 2023-04-22 16:11:51 -07:00
コミット 4ae6e8d5b1
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -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, ...) {