From 0e20afe918bb09fb008db36ca21dc4f38fd08aea Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 15 Sep 2020 19:20:49 +0200 Subject: [PATCH] fixed a potential crash when calling fieldval in some geometries --- cell.cpp | 2 +- pattern2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cell.cpp b/cell.cpp index d407713f..791d2d30 100644 --- a/cell.cpp +++ b/cell.cpp @@ -1330,7 +1330,7 @@ EX vector reverse_directions(heptagon *c, int dir) { } EX bool standard_tiling() { - return !arcm::in() && !kite::in() && !bt::in() && !arb::in(); + return !arcm::in() && !kite::in() && !bt::in() && !arb::in() && !nonisotropic && !hybri; } EX int valence() { diff --git a/pattern2.cpp b/pattern2.cpp index dfc6632f..82306af3 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1180,7 +1180,7 @@ EX namespace patterns { if(euclid) // use the torus ID si.id = fieldpattern::fieldval_uniq(c); - else if(PURE && !arcm::in()) + else if(PURE && standard_tiling()) // use the actual field codes si.id = fieldpattern::fieldval(c).first; else