From 9b0e2ae30a5e50ed7c61a3c289aac0c86c06f9db Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 20 Jul 2021 00:44:04 +0100 Subject: [PATCH] lowering: Do not construct range iter for empty plan entries We are going to want to let these have malformed reanges. Signed-off-by: Ian Jackson --- templates/script.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/script.ts b/templates/script.ts index 1a898ce0..6f070409 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -798,7 +798,8 @@ function lower_pieces(targets_todo: LowerTodoList): for (const pe of plan) { let z_top = pe.z_top; let z_bot = pe.z_bot; - if (pe.content.length != 0 && z_bot == null) { + if (! pe.content.length) continue; + if (z_bot == null) { let first_z = pe.content[0].p.z; if (z_top >= first_z) z_top = first_z; -- 2.30.2