鏡像自
https://github.com/minetest-mods/mesecons.git
已同步 2025-06-30 23:00:22 +02:00
Fix Luacontroller’s print() (#422)
Because of working inside the sandbox, it was unable to print tables.
此提交包含在:
@ -198,7 +198,11 @@ end
|
||||
-------------------------
|
||||
|
||||
local function safe_print(param)
|
||||
local string_meta = getmetatable("")
|
||||
local sandbox = string_meta.__index
|
||||
string_meta.__index = string -- Leave string sandbox temporarily
|
||||
print(dump(param))
|
||||
string_meta.__index = sandbox -- Restore string sandbox
|
||||
end
|
||||
|
||||
local function safe_date()
|
||||
|
新增問題並參考
封鎖使用者