Skip to content

Commit

Permalink
fix a crash case.
Browse files Browse the repository at this point in the history
  • Loading branch information
pigpigyyy committed Dec 19, 2023
1 parent 1b43ecc commit 8a7b5cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/yuescript/yue_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static std::unordered_set<std::string> Metamethods = {
"close"s // Lua 5.4
};

const std::string_view version = "0.21.4"sv;
const std::string_view version = "0.21.5"sv;
const std::string_view extension = "yue"sv;

class CompileError : public std::logic_error {
Expand Down Expand Up @@ -3959,6 +3959,7 @@ class YueCompilerImpl {
expListAssign && expListAssign->action && expListAssign->action.is<Assign_t>()) {
BLOCK_START
auto unary = singleUnaryExpFrom(expListAssign->expList->exprs.back());
BREAK_IF(!unary);
BREAK_IF(!unary->ops.empty());
auto value = static_cast<Value_t*>(unary->expos.front());
auto simpleValue = value->item.as<SimpleValue_t>();
Expand Down

0 comments on commit 8a7b5cc

Please sign in to comment.