Minor mistake in unpacking string
This commit is contained in:
parent
48fefb03cb
commit
02ab50d8dd
|
@ -138,7 +138,7 @@ function Struct.unpack(format, stream)
|
||||||
end
|
end
|
||||||
elseif opt == 's' then
|
elseif opt == 's' then
|
||||||
local bytes = {}
|
local bytes = {}
|
||||||
for j = 1 + iterator, string.len(stream) do
|
for j = iterator, string.len(stream) do
|
||||||
if string.sub(stream, j, j) == string.char(0) then
|
if string.sub(stream, j, j) == string.char(0) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue