From 9a2b70e96d25ff6bd7abc0b5c0040d82cb27e699 Mon Sep 17 00:00:00 2001 From: Lorenzo Cogotti Date: Mon, 15 Aug 2022 21:55:10 +0200 Subject: [PATCH] [crush] Fix dependency scan loop. Dependency count may change, and deps array length must be evaluated every loop. --- crush.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crush.lua b/crush.lua index fb947d8..78d4131 100644 --- a/crush.lua +++ b/crush.lua @@ -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