diff options
Diffstat (limited to 'script/vm/operator.lua')
-rw-r--r-- | script/vm/operator.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/script/vm/operator.lua b/script/vm/operator.lua index de2c3243..9dea01c1 100644 --- a/script/vm/operator.lua +++ b/script/vm/operator.lua @@ -231,11 +231,11 @@ vm.binarySwitch = util.switch() local b = vm.getInteger(source[2]) local op = source.op.type if a and b then - local result = op.type == '<<' and a << b - or op.type == '>>' and a >> b - or op.type == '&' and a & b - or op.type == '|' and a | b - or op.type == '~' and a ~ b + local result = op == '<<' and a << b + or op == '>>' and a >> b + or op == '&' and a & b + or op == '|' and a | b + or op == '~' and a ~ b vm.setNode(source, { type = 'integer', start = source.start, @@ -351,10 +351,10 @@ vm.binarySwitch = util.switch() local b = vm.getNumber(source[2]) if a and b then local op = source.op.type - local result = op.type == '>' and a > b - or op.type == '<' and a < b - or op.type == '>=' and a >= b - or op.type == '<=' and a <= b + local result = op == '>' and a > b + or op == '<' and a < b + or op == '>=' and a >= b + or op == '<=' and a <= b vm.setNode(source, { type = 'boolean', start = source.start, |