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) {