From 460def3fc6ae8885a78edbb090f69a7f22b08fa1 Mon Sep 17 00:00:00 2001 From: nilspolek Date: Sat, 27 Jan 2024 18:53:42 +0100 Subject: [PATCH] made some updates --- record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/record.c b/record.c index e44525a..2a2e34b 100644 --- a/record.c +++ b/record.c @@ -36,7 +36,7 @@ void setField(ObjRef arr, int point, ObjRef value){ int size = sizeof(*value); GET_REFS_PTR(arr)[point] = malloc(size); }else{ - int size = sizeof(*value) + (GET_ELEMENT_COUNT(value) * sizeof(*value)); + int size = sizeof(*value) + (GET_ELEMENT_COUNT(value) * sizeof(void *)); GET_REFS_PTR(arr)[point] = malloc(size); } * (ObjRef *)GET_REFS_PTR(arr)[point]->data = value;