[crush] Fix dependency scan loop.

Dependency count may change, and deps array length must be evaluated every loop.
This commit is contained in:
Lorenzo Cogotti 2022-08-15 21:55:10 +02:00
parent 9c143655fc
commit 9a2b70e96d
1 changed files with 4 additions and 1 deletions

View File

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