minor change
This change allows for databuffers to treat numbers like strings and a number that would contain more that 1 byte would be wxpanded to fit into the next. The max length is 4 bytes
This commit is contained in:
parent
bbfa5e7845
commit
1b0fe31002
@ -1020,7 +1020,7 @@ function bin.newDataBuffer(size,fill) -- fills with \0 or nul or with what you e
|
|||||||
if type(v)=="string" then
|
if type(v)=="string" then
|
||||||
data=v
|
data=v
|
||||||
elseif type(v)=="number" then
|
elseif type(v)=="number" then
|
||||||
data=string.char(v)
|
data=bits.numToBytes(v)
|
||||||
else
|
else
|
||||||
-- try to normalize the data of type v
|
-- try to normalize the data of type v
|
||||||
data=bin.normalizeData(v)
|
data=bin.normalizeData(v)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user