object initialisation
This commit is contained in:
@@ -110,12 +110,12 @@ static inline GroundSize doOffsets(GroundProgram* gp, GroundState* state, Ground
|
||||
s->offset = i++;
|
||||
}
|
||||
|
||||
// Now go through and add offsets to everything
|
||||
for (GroundSize j = 0; j < inst->args.len; j++) {
|
||||
// Now go through and add offsets to everything (skip struct name at index 0)
|
||||
for (GroundSize j = 1; j < inst->args.len; j++) {
|
||||
// struct field name
|
||||
GroundArg* arg = &inst->args.at[j];
|
||||
GroundObjectField* field = NULL;
|
||||
HASH_FIND_STR(state->variables, arg->as.ref->string, field);
|
||||
HASH_FIND_STR(gs->fields, arg->as.ref->string, field);
|
||||
if (field == NULL) {
|
||||
Ground.Log.Error("unexpected null struct field in Ground.New.Bytecode -> doOffsets");
|
||||
Ground.Flags.error = true;
|
||||
|
||||
Reference in New Issue
Block a user