Actually fix the bug

This commit is contained in:
2026-01-24 15:46:09 +11:00
parent bb0baba167
commit 337c6ada24

View File

@@ -443,6 +443,7 @@ GroundStruct parseStruct(GroundProgram* in, GroundScope* scope, size_t errorOffs
addInstructionToProgram(&gp, in->instructions[i]);
i++;
}
i--;
GroundFunction* function = parseFunction(&gp, errorOffset);
function->startLine = i;
@@ -509,6 +510,7 @@ GroundValue interpretGroundProgram(GroundProgram* in, GroundScope* inScope) {
addInstructionToProgram(&gp, in->instructions[i]);
i++;
}
i--;
GroundFunction* function = parseFunction(&gp, errorOffset);
function->startLine = i;
@@ -546,6 +548,7 @@ GroundValue interpretGroundProgram(GroundProgram* in, GroundScope* inScope) {
addInstructionToProgram(&gp, in->instructions[i]);
i++;
}
i--;
GroundValue gv = {
.type = STRUCTVAL,
@@ -571,7 +574,6 @@ GroundValue interpretGroundProgram(GroundProgram* in, GroundScope* inScope) {
count--;
}
}
i--;
}
if (in->instructions[i].type == STRUCT) {
int count = 1;
@@ -587,7 +589,6 @@ GroundValue interpretGroundProgram(GroundProgram* in, GroundScope* inScope) {
count--;
}
}
i--;
}
if (in->instructions[i].type == PAUSE || instructionsToPause == 0) {
printf("Paused execution\n");