made some updates

This commit is contained in:
nilspolek
2024-01-27 19:59:01 +01:00
parent 460def3fc6
commit fd15e54cdd
14 changed files with 95 additions and 95 deletions

View File

@@ -38,13 +38,13 @@ void fatalError(char *msg) {
*/
void * newPrimObject(int dataSize) {
ObjRef bigObjRef;
bigObjRef = malloc(sizeof(unsigned int) +
dataSize * sizeof(unsigned char));
int size = sizeof(unsigned int) + dataSize * sizeof(unsigned char);
bigObjRef = malloc(size);
bigObjRef->size = size;
if (bigObjRef == NULL) {
fatalError("newPrimObject() got no memory");
}
bigObjRef->size = dataSize;
bigObjRef->size = size;
return bigObjRef;
}

Binary file not shown.

Binary file not shown.