made some updates
This commit is contained in:
@@ -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.
Reference in New Issue
Block a user