From 2dee51c55f614a47a8e9db044d1ab76800185e00 Mon Sep 17 00:00:00 2001
From: Hensto <henrik.stolzmann@mailbox.tu-dresden.de>
Date: Wed, 3 Apr 2019 15:38:19 +0200
Subject: [PATCH] Correct logic error in treatment of special green rule 17 and
 22

As written the condition read
```
	(TAG(theElement) == PYRAMID && NSONS(theFather)==9) || other_condition
```
that is `ECLASS(theElement) == GREEN_CLASS` was not always checked.
We assume this was not intentional.
---
 gm/ugm.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gm/ugm.cc b/gm/ugm.cc
index 0a58e4ea4..49fc088dd 100644
--- a/gm/ugm.cc
+++ b/gm/ugm.cc
@@ -1424,9 +1424,9 @@ INT GetSideIDFromScratchOld (ELEMENT *theElement, NODE *theNode)
     {
 
       /* treatment of special green rule 17 and 22 */
-      if ((((TAG(theElement)==PYRAMID && NSONS(theFather)==9) ||
-            (TAG(theElement)==TETRAHEDRON && NSONS(theFather)==11)
-            && 2==CountSideNodes(theElement))) &&
+      if (((TAG(theElement)==PYRAMID && NSONS(theFather)==9) ||
+            (TAG(theElement)==TETRAHEDRON && NSONS(theFather)==11))
+            && 2==CountSideNodes(theElement) &&
           TAG(theFather)==HEXAHEDRON &&
           ECLASS(theElement)==GREEN_CLASS)
         /* not continue */;
-- 
GitLab