mirror of
https://github.com/Adorable-Catgirl/Zorya-NEO.git
synced 2024-12-23 09:28:07 +11:00
Use assert instead of print.
This commit is contained in:
parent
376ccc11a3
commit
782c99df08
@ -118,14 +118,13 @@ local function read_header(dat)
|
||||
end
|
||||
local ent = {}
|
||||
ent.magic, ent.namesize, ent.mode, ent.uid, ent.gid, ent.filesize, ent.mtime = string.unpack(e..header_fmt, dat)
|
||||
return ent, ""
|
||||
return ent
|
||||
end
|
||||
|
||||
local lname = ""
|
||||
while lname ~= "TRAILER!!!" do
|
||||
local dat = read(22)
|
||||
local e,r = read_header(dat)
|
||||
if r ~= "" then print(r) return end
|
||||
local e = assert(read_header(dat))
|
||||
e.name = read(e.namesize)
|
||||
e.pos = seek(e.namesize & 1)
|
||||
seek(e.filesize + (e.filesize & 1))
|
||||
@ -144,4 +143,4 @@ for i=1, #tbl do
|
||||
end
|
||||
end
|
||||
|
||||
error("Init not found.")
|
||||
error("Init not found.")
|
||||
|
Loading…
Reference in New Issue
Block a user