[crush] Fix dependency scan loop.

Dependency count may change, and deps array length must be evaluated every loop.
master
Lorenzo Cogotti 2 years ago
parent 9c143655fc
commit 9a2b70e96d

@ -263,7 +263,8 @@ local function run()
mkdir("lib") mkdir("lib")
-- NOTE: deps array may grow while scanning -- NOTE: deps array may grow while scanning
for i = 1,#deps do local i = 1
while i <= #deps do
local dep = deps[i] local dep = deps[i]
-- Fetch dependency -- Fetch dependency
@ -275,6 +276,8 @@ local function run()
if file_exists(depmanifest) then if file_exists(depmanifest) then
scandeps(depmanifest, 'skipdups', deps) scandeps(depmanifest, 'skipdups', deps)
end end
i = i + 1
end end
end end

Loading…
Cancel
Save