From 78433df36c5b492f366ba57d852f5393b786cfff Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 18 May 2023 10:10:08 +0800 Subject: fix issue #134. --- src/yuescript/yue_compiler.cpp | 4 ++-- 1 file 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 Metamethods = { "close"s // Lua 5.4 }; -const std::string_view version = "0.16.5"sv; +const std::string_view version = "0.16.6"sv; const std::string_view extension = "yue"sv; class CompileError : public std::logic_error { @@ -5074,7 +5074,7 @@ private: lua_pushlstring(L, str.c_str(), str.size()); } // cur pcall macroFunc args... } - bool success = lua_pcall(L, (args ? static_cast(args->size()) : 0) + 1, 2, 0) == 0; + bool success = lua_pcall(L, (args ? static_cast(args->size()) : 0), 1, 0) == 0; if (!success) { // cur err std::string err = lua_tostring(L, -1); throw CompileError("failed to expand macro: "s + err, x); -- cgit v1.2.3-55-g6feb