diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-16 14:42:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 14:42:56 +0100 |
commit | 88b8c3ec00179e8438480edde047098d44846776 (patch) | |
tree | 88b3f0853f5cd8051c74875d0ebef49889354ba5 /modules/gdscript | |
parent | f17b34c4793590978d999d0e9b5cde8666136e10 (diff) | |
parent | 61ac640aa0e14254c05ea00b865580115f4251e0 (diff) |
Merge pull request #44424 from briansemrau/gdscript-fix-and
Fix gdscript `and` operator
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_byte_codegen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index a4238e2eab..a5d96077d9 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -428,7 +428,7 @@ void GDScriptByteCodeGenerator::write_end_and(const Address &p_target) { patch_jump(logic_op_jump_pos2.back()->get()); logic_op_jump_pos1.pop_back(); logic_op_jump_pos2.pop_back(); - append(GDScriptFunction::OPCODE_ASSIGN_FALSE, 0); + append(GDScriptFunction::OPCODE_ASSIGN_FALSE, 1); append(p_target); } @@ -453,7 +453,7 @@ void GDScriptByteCodeGenerator::write_end_or(const Address &p_target) { // Jump away from the success condition. append(GDScriptFunction::OPCODE_JUMP, 0); append(opcodes.size() + 3); - // Here it means one of operands is false. + // Here it means one of operands is true. patch_jump(logic_op_jump_pos1.back()->get()); patch_jump(logic_op_jump_pos2.back()->get()); logic_op_jump_pos1.pop_back(); |