Minor mistake in unpacking string

This commit is contained in:
Konrad Kuśnierz 2015-05-19 13:41:40 +02:00
parent 48fefb03cb
commit 02ab50d8dd
1 changed files with 1 additions and 1 deletions

View File

@ -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