forked from ground/cground
Actually fix the bug
This commit is contained in:
@@ -443,6 +443,7 @@ GroundStruct parseStruct(GroundProgram* in, GroundScope* scope, size_t errorOffs
|
|||||||
addInstructionToProgram(&gp, in->instructions[i]);
|
addInstructionToProgram(&gp, in->instructions[i]);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
i--;
|
||||||
|
|
||||||
GroundFunction* function = parseFunction(&gp, errorOffset);
|
GroundFunction* function = parseFunction(&gp, errorOffset);
|
||||||
function->startLine = i;
|
function->startLine = i;
|
||||||
@@ -509,6 +510,7 @@ GroundValue interpretGroundProgram(GroundProgram* in, GroundScope* inScope) {
|
|||||||
addInstructionToProgram(&gp, in->instructions[i]);
|
addInstructionToProgram(&gp, in->instructions[i]);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
i--;
|
||||||
|
|
||||||
GroundFunction* function = parseFunction(&gp, errorOffset);
|
GroundFunction* function = parseFunction(&gp, errorOffset);
|
||||||
function->startLine = i;
|
function->startLine = i;
|
||||||
@@ -546,6 +548,7 @@ GroundValue interpretGroundProgram(GroundProgram* in, GroundScope* inScope) {
|
|||||||
addInstructionToProgram(&gp, in->instructions[i]);
|
addInstructionToProgram(&gp, in->instructions[i]);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
i--;
|
||||||
|
|
||||||
GroundValue gv = {
|
GroundValue gv = {
|
||||||
.type = STRUCTVAL,
|
.type = STRUCTVAL,
|
||||||
@@ -571,7 +574,6 @@ GroundValue interpretGroundProgram(GroundProgram* in, GroundScope* inScope) {
|
|||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i--;
|
|
||||||
}
|
}
|
||||||
if (in->instructions[i].type == STRUCT) {
|
if (in->instructions[i].type == STRUCT) {
|
||||||
int count = 1;
|
int count = 1;
|
||||||
@@ -587,7 +589,6 @@ GroundValue interpretGroundProgram(GroundProgram* in, GroundScope* inScope) {
|
|||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i--;
|
|
||||||
}
|
}
|
||||||
if (in->instructions[i].type == PAUSE || instructionsToPause == 0) {
|
if (in->instructions[i].type == PAUSE || instructionsToPause == 0) {
|
||||||
printf("Paused execution\n");
|
printf("Paused execution\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user