mirror of
https://github.com/Adorable-Catgirl/Zorya-NEO.git
synced 2024-11-27 04:38:06 +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
|
end
|
||||||
local ent = {}
|
local ent = {}
|
||||||
ent.magic, ent.namesize, ent.mode, ent.uid, ent.gid, ent.filesize, ent.mtime = string.unpack(e..header_fmt, dat)
|
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
|
end
|
||||||
|
|
||||||
local lname = ""
|
local lname = ""
|
||||||
while lname ~= "TRAILER!!!" do
|
while lname ~= "TRAILER!!!" do
|
||||||
local dat = read(22)
|
local dat = read(22)
|
||||||
local e,r = read_header(dat)
|
local e = assert(read_header(dat))
|
||||||
if r ~= "" then print(r) return end
|
|
||||||
e.name = read(e.namesize)
|
e.name = read(e.namesize)
|
||||||
e.pos = seek(e.namesize & 1)
|
e.pos = seek(e.namesize & 1)
|
||||||
seek(e.filesize + (e.filesize & 1))
|
seek(e.filesize + (e.filesize & 1))
|
||||||
|
Loading…
Reference in New Issue
Block a user