I don't have to close it myself anymore
This commit is contained in:
parent
17cc43fe89
commit
712346e2c5
2
ccpi.lua
2
ccpi.lua
|
@ -74,12 +74,10 @@ local function parse(fp)
|
|||
elseif magic:sub(1, 3) == "CPI" then
|
||||
local version = magic:byte(4, 4)
|
||||
if decoders[version] == nil then
|
||||
fp:close()
|
||||
return nil, string.format("Invalid CPI version 0x%02x", version)
|
||||
end
|
||||
res, err = decoders[version](image, fp)
|
||||
else
|
||||
fp:close()
|
||||
return nil, "Invalid header: expected CCPI got " .. magic
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue