forked from ground/ground
Fix subtraction bug
This commit is contained in:
@@ -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));
|
||||
|
||||
6
tests/log.txt
Normal file
6
tests/log.txt
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user