mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Fix debug.getinfo not being unset in CPCSM (#16506)
regression was introduced in eeb6cab
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local getinfo, rawget, rawset = debug.getinfo, rawget, rawset
|
||||
local debug_getinfo, rawget, rawset = debug.getinfo, rawget, rawset
|
||||
|
||||
function core.global_exists(name)
|
||||
if type(name) ~= "string" then
|
||||
@@ -18,7 +18,7 @@ function meta:__newindex(name, value)
|
||||
if declared[name] then
|
||||
return
|
||||
end
|
||||
local info = getinfo(2, "Sl")
|
||||
local info = debug_getinfo(2, "Sl")
|
||||
if info ~= nil then
|
||||
local desc = ("%s:%d"):format(info.short_src, info.currentline)
|
||||
local warn_key = ("%s\0%d\0%s"):format(info.source, info.currentline, name)
|
||||
@@ -36,7 +36,7 @@ function meta:__index(name)
|
||||
if declared[name] then
|
||||
return
|
||||
end
|
||||
local info = getinfo(2, "Sl")
|
||||
local info = debug_getinfo(2, "Sl")
|
||||
if info == nil then
|
||||
return
|
||||
end
|
||||
|
Reference in New Issue
Block a user