From 712346e2c55c8a9477295426cd23bd0c315c27e4 Mon Sep 17 00:00:00 2001 From: hkc Date: Fri, 13 Sep 2024 01:17:20 +0300 Subject: [PATCH] I don't have to close it myself anymore --- ccpi.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/ccpi.lua b/ccpi.lua index 3ef6122..4f22c6d 100644 --- a/ccpi.lua +++ b/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