ASDUIFBUIJDBSUIFBI STUPID BUG ONFGIUODSDNDIOFNOISNFIONADOSIFNI

This commit is contained in:
2026-07-13 14:40:56 +10:00
parent f2fbeb3a68
commit 71dfbb5855
2 changed files with 8 additions and 0 deletions

View File

@@ -1039,6 +1039,11 @@ struct GroundExecutionResult _GroundBytecodeInstructionExecute(GroundBytecodeIns
GroundBytecodeValue* current = HEAP_GET(heap, instruction->args.at[0]); GroundBytecodeValue* current = HEAP_GET(heap, instruction->args.at[0]);
for (GroundSize i = 1; i < instruction->args.len - 1; i++) { for (GroundSize i = 1; i < instruction->args.len - 1; i++) {
if (current->type.type != GroundType_Object) {
Ground.Log.Error("GETFIELD on non-object value in Ground.Bytecode.Instruction.execute");
Ground.Flags.error = true;
return CONTINUE;
}
current = &current->as.Object.values[instruction->args.at[i]]; current = &current->as.Object.values[instruction->args.at[i]];
} }

View File

@@ -66,6 +66,9 @@ char* _GroundStringifyBytecodeValue(GroundBytecodeValue* value) {
case GroundType_Object: { case GroundType_Object: {
Estr str = CREATE_ESTR("<object fields: { "); Estr str = CREATE_ESTR("<object fields: { ");
for (GroundSize i = 0; i < value->as.Struct.size; i++) { for (GroundSize i = 0; i < value->as.Struct.size; i++) {
if (i != 0) {
APPEND_ESTR(str, ", ");
}
char* field = Ground.Stringify.BytecodeValue(&value->as.Struct.values[i]); char* field = Ground.Stringify.BytecodeValue(&value->as.Struct.values[i]);
APPEND_ESTR(str, field); APPEND_ESTR(str, field);
free(field); free(field);