From 71dfbb58554c4a6ae53ac4a7ca63b38bbbb118eb Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Mon, 13 Jul 2026 14:40:56 +1000 Subject: [PATCH] ASDUIFBUIJDBSUIFBI STUPID BUG ONFGIUODSDNDIOFNOISNFIONADOSIFNI --- src/Bytecode/Instruction/execute.c | 5 +++++ src/Stringify/BytecodeValue.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/Bytecode/Instruction/execute.c b/src/Bytecode/Instruction/execute.c index dc73901..a2e2dbf 100644 --- a/src/Bytecode/Instruction/execute.c +++ b/src/Bytecode/Instruction/execute.c @@ -1039,6 +1039,11 @@ struct GroundExecutionResult _GroundBytecodeInstructionExecute(GroundBytecodeIns GroundBytecodeValue* current = HEAP_GET(heap, instruction->args.at[0]); 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 = ¤t->as.Object.values[instruction->args.at[i]]; } diff --git a/src/Stringify/BytecodeValue.c b/src/Stringify/BytecodeValue.c index ea2c9d5..284a4af 100644 --- a/src/Stringify/BytecodeValue.c +++ b/src/Stringify/BytecodeValue.c @@ -66,6 +66,9 @@ char* _GroundStringifyBytecodeValue(GroundBytecodeValue* value) { case GroundType_Object: { Estr str = CREATE_ESTR("as.Struct.size; i++) { + if (i != 0) { + APPEND_ESTR(str, ", "); + } char* field = Ground.Stringify.BytecodeValue(&value->as.Struct.values[i]); APPEND_ESTR(str, field); free(field);