mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-14 14:20:33 +01:00
Fix print() exposed to the Luacontroller
This commit is contained in:
parent
f61b1affea
commit
ae0c6149b0
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user