From f01b8c3c58f6760c3231768c9da79481ebfc8ee1 Mon Sep 17 00:00:00 2001 From: Philipp Schaad Date: Wed, 30 Oct 2024 12:43:39 +0100 Subject: [PATCH] Fix SM layouter for some irregular / irreducible CF --- src/layouter/state_machine/sm_layouter.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/layouter/state_machine/sm_layouter.ts b/src/layouter/state_machine/sm_layouter.ts index 67c45df..b9b49c5 100644 --- a/src/layouter/state_machine/sm_layouter.ts +++ b/src/layouter/state_machine/sm_layouter.ts @@ -353,6 +353,9 @@ export class SMLayouter { if (n !== node) exitCandidates.add(n); } + const loopGuardPostdom = this.iPostDoms.get(node) + if (loopGuardPostdom && loopGuardPostdom !== node) + exitCandidates.add(loopGuardPostdom); if (exitCandidates.size < 1) { throw new Error('No exit candidates found.');