diff --git a/src/interpreter.c b/src/interpreter.c index 4288afe..38321bd 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -1332,9 +1332,9 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop } if (right->type == INT) { - result += right->data.intVal; + result -= right->data.intVal; } else if (right->type == DOUBLE) { - result += right->data.doubleVal; + result -= right->data.doubleVal; } addVariable(scope->variables, in->args.args[2].value.refName, createDoubleGroundValue(result)); diff --git a/tests/log.txt b/tests/log.txt new file mode 100644 index 0000000..e8a281a --- /dev/null +++ b/tests/log.txt @@ -0,0 +1,6 @@ +Lists are deprecated, please migrate to using the "collections" library soon. +Ground runtime error: + ErrorType: Hello + ErrorContext: [1, 2, 3, Hi!] + ErrorInstruction: error "Hello" [1, 2, 3, Hi!] 1 + ErrorLine: 2