Skip to content

Commit 14b400e

Browse files
committed
Fixed filename length not being fetched correctly on 16-bit systems.
1 parent e62bcfd commit 14b400e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

arch/UNZIP.LUA

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ function unzip(z, d, l, x)
5959
-- ec = Expected crc32 checksum
6060
local s, re, v, fl, cm, cr, cs, us, nl, el, fn, of, ec = f:read(30), "cur"
6161
if not s or #s < 30 or not s:find("^PK\3\4") then break end
62-
v, fl, cm, _, _, ec, cs, us, nl, el = string.unpack("<HHHHHIIIHH", s, 5)
63-
64-
--TODO: Fix filename length on 16-bit builds
62+
v, fl, cm, _, _, ec, cs, us, nl, el = string.unpack("<HHHHHI4I4I4HH", s, 5)
6563
fn, E = f:read(nl) D() -- read the filename
6664
if el > 0 then f:seek(re, el) end
6765

0 commit comments

Comments
 (0)