Skip to content
Permalink
Browse files

Fix Luacontroller’s print() (#422)

Because of working inside the sandbox, it was unable to print tables.
  • Loading branch information
numberZero committed Jul 23, 2018
1 parent 334400a commit d4e05f33afc9a369fbbcdb49aea10cd860a7a680
Showing with 4 additions and 0 deletions.
  1. +4 −0 mesecons_luacontroller/init.lua
@@ -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()

0 comments on commit d4e05f3

Please sign in to comment.