Funtion unpack moved to table.unpack in LUA 5.3+
This commit is contained in:
1 parent
0421f5fde5
commit
d616439618
3 files changed
+8
-7
No files matched your search
@@ -94,7 +94,7 @@ local function dumptofile(uid, keys)
|
||||
local key_b = ''
|
||||
|
||||
for sector = 0, #keys do
|
||||
local keyA, keyB = unpack(keys[sector])
|
||||
local keyA, keyB = table.unpack(keys[sector])
|
||||
key_a = key_a .. bin.pack('H', keyA);
|
||||
key_b = key_b .. bin.pack('H', keyB);
|
||||
end
|
||||
@@ -124,7 +124,7 @@ local function printKeys(keys)
|
||||
print('|sec|key A |res|key B |res|')
|
||||
print('|---|----------------|---|----------------|---|')
|
||||
for sector = 0, #keys do
|
||||
local keyA, keyB = unpack(keys[sector])
|
||||
local keyA, keyB = table.unpack(keys[sector])
|
||||
print(('|%03d| %s | %s | %s | %s |'):format(sector, keyA, 1, keyB, 1))
|
||||
end
|
||||
print('|---|----------------|---|----------------|---|')
|
||||
|
||||
Reference in new issue
Block a user