From 6204d956b890e5b7fc191dd7353f0801b59535bc Mon Sep 17 00:00:00 2001 From: cdemirer <41021322+cdemirer@users.noreply.github.com> Date: Sat, 4 Dec 2021 10:05:56 +0800 Subject: [PATCH] Fix nested ternary-if codegen (#55582) --- modules/gdscript/gdscript_byte_codegen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index 6a7e4278d26..1637c217348 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -688,6 +688,7 @@ void GDScriptByteCodeGenerator::write_ternary_false_expr(const Address &p_expr) void GDScriptByteCodeGenerator::write_end_ternary() { patch_jump(ternary_jump_skip_pos.back()->get()); ternary_jump_skip_pos.pop_back(); + ternary_result.pop_back(); } void GDScriptByteCodeGenerator::write_set(const Address &p_target, const Address &p_index, const Address &p_source) {