Fix empty key list bug.

When input key list size is greater than 85, table.concat() returns empty because the last parameter is the end offset not the increment value.
This commit is contained in:
AnthraX1 2018-02-26 04:00:08 +11:00 committed by GitHub
commit ae86abb2fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ function checkBlock(blockNo, keys, keyType)
while remaining > 0 do while remaining > 0 do
local n,data = remaining, nil local n,data = remaining, nil
if remaining > 85 then n = 85 end if remaining > 85 then n = 85 end
local data = table.concat(keys,"",start,n) local data = table.concat(keys,"",start,start + n)
--print("data",data) --print("data",data)
--print("data len", #data) --print("data len", #data)
print(("Testing block %d, keytype %d, with %d keys"):format(blockNo, keyType, n)) print(("Testing block %d, keytype %d, with %d keys"):format(blockNo, keyType, n))