From df15a7b78e929203f4de46348b25f3630ac079c1 Mon Sep 17 00:00:00 2001 From: Xinhao Yuan Date: Mon, 6 Sep 2021 14:49:49 -0400 Subject: [PATCH] Avoid deadloop when recomputing is triggered. --- engine.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine.lua b/engine.lua index 696d153..5bb642e 100644 --- a/engine.lua +++ b/engine.lua @@ -36,8 +36,9 @@ local function fair_split(length, shares) local sum_adj local remaining = #shares local spare = nil - local need_recompute = false + local need_recompute repeat + need_recompute = false sum_weight = 0 sum_adj = 0 for i = 1, #shares do