diff options
author | Vitaliy <silverunicorn2011@yandex.ru> | 2018-07-23 15:53:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 15:53:32 +0300 |
commit | d4e05f33afc9a369fbbcdb49aea10cd860a7a680 (patch) | |
tree | e1ec851a92cb574714e05081565a49de372b663e | |
parent | 334400a5413f7a8c5e7d30f2d0041bcb24e299d4 (diff) |
Fix Luacontroller’s print() (#422)v1.2
Because of working inside the sandbox, it was unable to print tables.
-rw-r--r-- | mesecons_luacontroller/init.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua index 59c2442..0f8adbc 100644 --- a/mesecons_luacontroller/init.lua +++ b/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() |