diff --git a/client/init.lua b/client/init.lua index b53c193..2de6a5c 100644 --- a/client/init.lua +++ b/client/init.lua @@ -1,5 +1,12 @@ -- Buildat: client/init.lua buildat = {} +function buildat.bytes(data) + local result = {} + for i=1,#data do + table.insert(result, string.byte(data, i)) + end + return result +end function buildat.dump(thing) if type(thing) == 'string' then return '"'..thing..'"' diff --git a/client/sandbox.lua b/client/sandbox.lua index acac593..1caad66 100644 --- a/client/sandbox.lua +++ b/client/sandbox.lua @@ -1,6 +1,7 @@ local log = buildat.Logger("__client/sandbox") local buildat_safe_list = { + "bytes", "dump", "Logger", }