From fa03b4f2755cf237cb807cb38cfdc5326b84068a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 21 Feb 2023 18:47:43 +0100 Subject: [PATCH] fixed an error computing distances in bitruncated {5,4} causing crashes --- heptagon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heptagon.cpp b/heptagon.cpp index 39dd25d5..6bcdf40f 100644 --- a/heptagon.cpp +++ b/heptagon.cpp @@ -137,8 +137,8 @@ heptagon *buildHeptagon(heptagon *parent, int d, hstate s, int pard = 0, int fix int d1 = (d+S7-1)%S7; bool missing0 = !h->move(0)->move(d1); if(missing0) { - if(s == 1) - h->distance = h->move(0)->distance + 1; + if(s == 1 && h->move(0)->s != hsOrigin) + h->distance = h->move(0)->distance + 1; } else { heptagon* h1 = createStep(h->move(0), d1);