Skip to content

Commit fb67ae6

Browse files
committed
Corrected pointer alignment when skipping files in the zip.
1 parent 6464bd5 commit fb67ae6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/UNZIP.LUA

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function unzip(z, d, l, x)
6363
if el > 0 then f:seek("cur", el) end
6464

6565
if x then -- Skip file if it's on the exclude list
66-
for _, i in ipairs(x) do if i == fn then goto L end end
66+
for _, i in ipairs(x) do if i == fn then f:seek("cur", cs) goto L end end
6767
end
6868

6969
if l then -- Skip file if it's not on the include list
@@ -72,7 +72,7 @@ function unzip(z, d, l, x)
7272
local j
7373

7474
for _, i in ipairs(l) do if i == fn then j = 1 break end end
75-
if not j then goto L end
75+
if not j then f:seek("cur", cs) goto L end
7676
end
7777

7878
re = cs
@@ -144,7 +144,7 @@ end
144144

145145
if arg[-1] then
146146
if #arg < 1 then
147-
print(arg[-1] .. " " .. (arg[0] or "?") .. "file[.zip] [list] [-x xlist] -d exdir")
147+
print(arg[-1] .. " " .. (arg[0] or "?") .. "file[.zip] [list] [-x xlist] [-d exdir]")
148148
os.exit(1)
149149
end
150150

0 commit comments

Comments
 (0)