From c9040df0903342a4a964637bf7ae45e6be83c170 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 29 Nov 2024 20:44:16 +0300 Subject: [PATCH] fix it temporary and think deeper after 0.25 release --- src/logic/scripting/lua/lua_util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logic/scripting/lua/lua_util.cpp b/src/logic/scripting/lua/lua_util.cpp index 8c83dc50..091418cd 100644 --- a/src/logic/scripting/lua/lua_util.cpp +++ b/src/logic/scripting/lua/lua_util.cpp @@ -175,7 +175,7 @@ int lua::call_nothrow(State* L, int argc, int nresults) { int handler_pos = gettop(L) - argc; pushcfunction(L, l_error_handler); insert(L, handler_pos); - if (lua_pcall(L, argc, LUA_MULTRET, handler_pos)) { + if (lua_pcall(L, argc, -1, handler_pos)) { auto errorstr = tostring(L, -1); if (errorstr) { log_error(errorstr); @@ -187,7 +187,7 @@ int lua::call_nothrow(State* L, int argc, int nresults) { return 0; } remove(L, handler_pos); - return nresults == -1 ? 1 : nresults; + return 1; } void lua::dump_stack(State* L) {