summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcdemirer <41021322+cdemirer@users.noreply.github.com>2021-12-04 10:05:56 +0800
committercdemirer <41021322+cdemirer@users.noreply.github.com>2021-12-04 10:12:02 +0800
commit6204d956b890e5b7fc191dd7353f0801b59535bc (patch)
treea9204eab4a7339671c594855b31b951299bc2317
parent4f298237bf887c8540eadd47672158c04e2300dd (diff)
Fix nested ternary-if codegen (#55582)
-rw-r--r--modules/gdscript/gdscript_byte_codegen.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp
index 6a7e4278d2..1637c21734 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) {