fix: close fp
This commit is contained in:
parent
a65b94e483
commit
a78851c220
|
|
@ -4,6 +4,7 @@ local opcodes = require('opcodes')
|
|||
fp = io.open('tests/test1.luo')
|
||||
header = readbc.read_header(fp)
|
||||
proto = readbc.read_proto(fp)
|
||||
fp:close()
|
||||
|
||||
for i = 1, #proto.bcins do
|
||||
local decoded = opcodes.decode(proto.bcins[i])
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@ local readbc = require('readbc')
|
|||
fp = io.open('tests/test1.luo')
|
||||
header = readbc.read_header(fp)
|
||||
proto = readbc.read_proto(fp)
|
||||
fo:close()
|
||||
|
||||
print(#proto.bcins)
|
||||
|
|
|
|||
Loading…
Reference in New Issue