From a5a9d887da8383e66acf241c98d9c1ef1d705a99 Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 23 May 2018 17:43:56 -0300 Subject: [PATCH] Fix positive operator in GDScript compiler (cherry picked from commit 3cec24baa850019f9968b4e04e9c79fbddee3b72) --- modules/gdscript/gdscript_compiler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index add3807437c..459416c4646 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -726,6 +726,9 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser:: case GDScriptParser::OperatorNode::OP_NEG: { if (!_create_unary_operator(codegen, on, Variant::OP_NEGATE, p_stack_level)) return -1; } break; + case GDScriptParser::OperatorNode::OP_POS: { + if (!_create_unary_operator(codegen, on, Variant::OP_POSITIVE, p_stack_level)) return -1; + } break; case GDScriptParser::OperatorNode::OP_NOT: { if (!_create_unary_operator(codegen, on, Variant::OP_NOT, p_stack_level)) return -1; } break;