From: Ian Jackson Date: Sat, 10 Jul 2021 16:54:52 +0000 (+0100) Subject: script lower: Fix handling of heavy targets X-Git-Tag: otter-0.7.2~142 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=593edba64b8913929df58388cd96cbce60985fbf;p=otter.git 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 --- 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; }