made some updates

This commit is contained in:
nilspolek 2024-01-27 18:52:39 +01:00
parent bc56a6a1c2
commit 4cf1a82974
6 changed files with 1 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
njvm.o

Binary file not shown.

View File

@ -36,7 +36,7 @@ void setField(ObjRef arr, int point, ObjRef value){
int size = sizeof(*value); int size = sizeof(*value);
GET_REFS_PTR(arr)[point] = malloc(size); GET_REFS_PTR(arr)[point] = malloc(size);
}else{ }else{
int size = sizeof(*value) + (GET_ELEMENT_COUNT(value) * sizeof(ObjRef)); int size = sizeof(*value) + (GET_ELEMENT_COUNT(value) * sizeof(*value));
GET_REFS_PTR(arr)[point] = malloc(size); GET_REFS_PTR(arr)[point] = malloc(size);
} }
* (ObjRef *)GET_REFS_PTR(arr)[point]->data = value; * (ObjRef *)GET_REFS_PTR(arr)[point]->data = value;