diff options
-rw-r--r-- | src/yuescript/yue_compiler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index e97ec9f..918ae2a 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.5"sv; | 75 | const std::string_view version = "0.16.6"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 { |
@@ -5074,7 +5074,7 @@ private: | |||
5074 | lua_pushlstring(L, str.c_str(), str.size()); | 5074 | lua_pushlstring(L, str.c_str(), str.size()); |
5075 | } // cur pcall macroFunc args... | 5075 | } // cur pcall macroFunc args... |
5076 | } | 5076 | } |
5077 | bool success = lua_pcall(L, (args ? static_cast<int>(args->size()) : 0) + 1, 2, 0) == 0; | 5077 | bool success = lua_pcall(L, (args ? static_cast<int>(args->size()) : 0), 1, 0) == 0; |
5078 | if (!success) { // cur err | 5078 | if (!success) { // cur err |
5079 | std::string err = lua_tostring(L, -1); | 5079 | std::string err = lua_tostring(L, -1); |
5080 | throw CompileError("failed to expand macro: "s + err, x); | 5080 | throw CompileError("failed to expand macro: "s + err, x); |