From 593edba64b8913929df58388cd96cbce60985fbf Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 10 Jul 2021 17:54:52 +0100 Subject: [PATCH] script lower: Fix handling of heavy targets We need to keep walking if there are any, or they won't end up moved. Signed-off-by: Ian Jackson --- templates/script.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/templates/script.ts b/templates/script.ts index c49bc141..e3ed01d9 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -658,15 +658,10 @@ function lower_pieces(targets_todo: LowerTodoList): let walk = pieces_marker; for (;;) { // starting at the bottom of the stack order - if (n_targets_todo_light == 0 - && q_z_top !== null) { - // no light targets left, state Z, we can stop now - console.log('LOWER STATE Z FINISHED'); - break; - } if (Object.keys(targets_todo).length == 0 && q_z_top !== null) { - console.log('LOWER NO TARGETS BUT LIGHT!', n_targets_todo_light); + // no targets left, state Z, we can stop now + console.log('LOWER STATE Z FINISHED'); break; } -- 2.30.2