From 2620b2fa15e35f208c038c5fcff7f4e0e850b426 Mon Sep 17 00:00:00 2001 From: Xie Zicong Date: Sun, 5 Jan 2025 15:55:53 +0000 Subject: [PATCH] Fixed a small bug in If processing logic. --- prototype/compiler.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prototype/compiler.cc b/prototype/compiler.cc index 92dbd9d..6679390 100644 --- a/prototype/compiler.cc +++ b/prototype/compiler.cc @@ -4228,6 +4228,8 @@ void BytecodeGenerator::HandleStmt(StmtNode* stmt, } else { size_t false_name_index = global_memory_.Add(0x01, 3, "$0"); size_t false_name_ptr_index = global_memory_.Add(0x06, 8); + code.push_back(Bytecode(_AQVM_OPERATOR_PTR, false_name_index, + false_name_ptr_index)); code.push_back(Bytecode(_AQVM_OPERATOR_IF, condition_index, true_name_ptr_index, false_name_ptr_index)); }