From 031f0b4c6a42b18cd2d991283c9a6246826d6b9f Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Wed, 13 Mar 2024 16:16:55 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D0=B8=20'c?= =?UTF-8?q?v4/list=5Fops.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv4/list_ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cv4/list_ops.c b/cv4/list_ops.c index 0c7dd34..8c66e6f 100644 --- a/cv4/list_ops.c +++ b/cv4/list_ops.c @@ -1,6 +1,9 @@ #include "list_ops.h" list_t *new_list(size_t length, list_element_t elements[]){ + list_t* list = (list_t*)malloc(sizeof(list_t) + length * sizeof(list_element_t)); + list->length = length; + memcpy(list->elements,elements, length*sizeof(list_element_t)); return NULL; }