Fix bug about passing objs to functions
This commit is contained in:
@@ -382,6 +382,7 @@ GroundStruct parseStruct(GroundProgram* in, GroundScope* scope, size_t errorOffs
|
||||
gv.type = CUSTOM;
|
||||
gv.data.customVal = malloc(sizeof(GroundObject));
|
||||
*gv.data.customVal = createObject(*gstruct);
|
||||
gv.customType = gstruct;
|
||||
break;
|
||||
}
|
||||
case NONE: {
|
||||
@@ -1981,6 +1982,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
|
||||
gv.type = CUSTOM;
|
||||
gv.data.customVal = malloc(sizeof(GroundObject));
|
||||
*gv.data.customVal = createObject(*gstruct);
|
||||
gv.customType = gstruct;
|
||||
break;
|
||||
}
|
||||
case NONE: {
|
||||
|
||||
Reference in New Issue
Block a user