diff options
| author | Li Jin <dragon-fly@qq.com> | 2023-03-30 17:54:15 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2023-03-30 17:54:15 +0800 |
| commit | 07d0de56b6536561ea348352107b1337ad129009 (patch) | |
| tree | fff6861fe961022ca42ecdef85f05d8b17e669c0 /src | |
| parent | 85c45027dabaf46e81d56414bd60ec4d727a4edd (diff) | |
| download | yuescript-07d0de56b6536561ea348352107b1337ad129009.tar.gz yuescript-07d0de56b6536561ea348352107b1337ad129009.tar.bz2 yuescript-07d0de56b6536561ea348352107b1337ad129009.zip | |
fix an invalid memory accessing issue.v0.16.1
Diffstat (limited to '')
| -rw-r--r-- | src/yuescript/yue_compiler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index a98d1c2..f4b4330 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
| @@ -72,7 +72,7 @@ static std::unordered_set<std::string> Metamethods = { | |||
| 72 | "close"s // Lua 5.4 | 72 | "close"s // Lua 5.4 |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | const std::string_view version = "0.16.0"sv; | 75 | const std::string_view version = "0.16.1"sv; |
| 76 | const std::string_view extension = "yue"sv; | 76 | const std::string_view extension = "yue"sv; |
| 77 | 77 | ||
| 78 | class CompileError : public std::logic_error { | 78 | class CompileError : public std::logic_error { |
| @@ -7885,6 +7885,7 @@ private: | |||
| 7885 | } | 7885 | } |
| 7886 | } | 7886 | } |
| 7887 | auto target = import->target.get(); | 7887 | auto target = import->target.get(); |
| 7888 | x = target; | ||
| 7888 | auto value = x->new_ptr<Value_t>(); | 7889 | auto value = x->new_ptr<Value_t>(); |
| 7889 | if (auto var = ast_cast<Variable_t>(target)) { | 7890 | if (auto var = ast_cast<Variable_t>(target)) { |
| 7890 | auto callable = x->new_ptr<Callable_t>(); | 7891 | auto callable = x->new_ptr<Callable_t>(); |
