forked from ground/ground
Merge branch 'master' of https://chookspace.com/ground/ground
This commit is contained in:
@@ -1183,11 +1183,11 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
|
||||
char buf[256];
|
||||
switch (value->type) {
|
||||
case INT: {
|
||||
snprintf(buf, sizeof(buf) * 256, "%" PRId64, value->data.intVal);
|
||||
snprintf(buf, sizeof(buf), "%" PRId64, value->data.intVal);
|
||||
break;
|
||||
}
|
||||
case DOUBLE: {
|
||||
snprintf(buf, sizeof(buf) * 256, "%f", value->data.doubleVal);
|
||||
snprintf(buf, sizeof(buf), "%f", value->data.doubleVal);
|
||||
break;
|
||||
}
|
||||
case STRING: {
|
||||
@@ -1913,16 +1913,20 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
|
||||
GroundProgram program = parseFile(fileContents);
|
||||
free(fileContents);
|
||||
|
||||
GroundScope newScope = {
|
||||
.variables = scope->variables,
|
||||
.labels = malloc(sizeof(GroundLabel*)),
|
||||
.isMainScope = false
|
||||
};
|
||||
GroundScope newScope = {
|
||||
.variables = scope->variables,
|
||||
.labels = malloc(sizeof(GroundLabel*)),
|
||||
.isMainScope = false
|
||||
};
|
||||
|
||||
*newScope.labels = NULL;
|
||||
*newScope.labels = NULL;
|
||||
|
||||
int ci = currentInstruction;
|
||||
|
||||
interpretGroundProgram(&program, &newScope);
|
||||
|
||||
currentInstruction = ci;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user