1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

unset debug.getinfo

This commit is contained in:
Desour 2025-03-25 13:45:22 +01:00
parent a2f98b1879
commit 5a422ca0c6
7 changed files with 22 additions and 10 deletions

View file

@ -5,6 +5,7 @@
local format, ipairs, type = string.format, ipairs, type
local core, get_current_modname = core, core.get_current_modname
local profiler, sampler = ...
local debug_getinfo = debug.getinfo
local instrument_builtin = core.settings:get_bool("instrument.builtin", false)
@ -67,7 +68,7 @@ local worldmods_path = regex_escape(core.get_worldpath())
local user_path = regex_escape(core.get_user_path())
local builtin_path = regex_escape(core.get_builtin_path())
local function generate_source_location(def)
local info = debug.getinfo(def.func)
local info = debug_getinfo(def.func)
local modpath = regex_escape(core.get_modpath(def.mod) or "")
local source = info.source
if modpath ~= "" then