From ab129367adc2f515e9452d4928163df2715e0a04 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Mon, 12 Oct 2026 00:15:28 +0300 Subject: [PATCH] fix registry access in generator scripts --- src/logic/scripting/lua/lua_engine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/logic/scripting/lua/lua_engine.cpp b/src/logic/scripting/lua/lua_engine.cpp index 812f67665..1e73ea903 100644 --- a/src/logic/scripting/lua/lua_engine.cpp +++ b/src/logic/scripting/lua/lua_engine.cpp @@ -196,6 +196,10 @@ void lua::init_state(State* L, StateType stateType) { if (stateType == StateType::GENERATOR) { pushnil(L); setglobal(L, "ffi"); + + static const char* removed_debug[] { + "getregistry", "getupvalue", "setupvalue", "getinfo", nullptr}; + remove_lib_funcs(L, "debug", removed_debug); } }