client/lua: buildat.bytes(data)
This commit is contained in:
parent
8939df9619
commit
eb9e2ada26
@ -1,5 +1,12 @@
|
|||||||
-- Buildat: client/init.lua
|
-- Buildat: client/init.lua
|
||||||
buildat = {}
|
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)
|
function buildat.dump(thing)
|
||||||
if type(thing) == 'string' then
|
if type(thing) == 'string' then
|
||||||
return '"'..thing..'"'
|
return '"'..thing..'"'
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local log = buildat.Logger("__client/sandbox")
|
local log = buildat.Logger("__client/sandbox")
|
||||||
|
|
||||||
local buildat_safe_list = {
|
local buildat_safe_list = {
|
||||||
|
"bytes",
|
||||||
"dump",
|
"dump",
|
||||||
"Logger",
|
"Logger",
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user