mirror of
https://github.com/Adorable-Catgirl/Zorya-NEO.git
synced 2025-04-17 09:08:15 +10:00
Make selfextract assert error a message
This commit is contained in:
parent
760bec1eb7
commit
16fbdff3a5
@ -112,7 +112,7 @@ end
|
|||||||
local function read_header(dat)
|
local function read_header(dat)
|
||||||
local e = get_end(en)
|
local e = get_end(en)
|
||||||
local m = string.unpack(e.."I2", dat)
|
local m = string.unpack(e.."I2", dat)
|
||||||
if m ~= magic and m ~= magic_rev then return nil, "bad magic" end
|
if m ~= magic and m ~= magic_rev then return nil end
|
||||||
if m ~= magic then
|
if m ~= magic then
|
||||||
e = get_end(not en)
|
e = get_end(not en)
|
||||||
end
|
end
|
||||||
@ -124,7 +124,7 @@ end
|
|||||||
local lname = ""
|
local lname = ""
|
||||||
while lname ~= "TRAILER!!!" do
|
while lname ~= "TRAILER!!!" do
|
||||||
local dat = read(22)
|
local dat = read(22)
|
||||||
local e = assert(read_header(dat))
|
local e = assert(read_header(dat), "bad magic")
|
||||||
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