summaryrefslogtreecommitdiffstats
path: root/src/map/amap
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-11-04 15:15:18 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2015-11-04 15:15:18 -0800
commit8ee49ff150a12f7183fe25e0a8d8e845391c100b (patch)
tree05bda2a4bd6a8036455825e3e80b93e7f5a26aa5 /src/map/amap
parentdf6c9415c138e90bbd15c1dc519a463b344aabd8 (diff)
downloadabc-8ee49ff150a12f7183fe25e0a8d8e845391c100b.tar.gz
abc-8ee49ff150a12f7183fe25e0a8d8e845391c100b.tar.bz2
abc-8ee49ff150a12f7183fe25e0a8d8e845391c100b.zip
Bug fix in constructing internal choices by 'amap'.
Diffstat (limited to 'src/map/amap')
-rw-r--r--src/map/amap/amapInt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/amap/amapInt.h b/src/map/amap/amapInt.h
index b28ea7e7..82ca49dd 100644
--- a/src/map/amap/amapInt.h
+++ b/src/map/amap/amapInt.h
@@ -256,7 +256,7 @@ static inline int Amap_ObjLevel( Amap_Obj_t * pObj )
static inline void Amap_ObjSetLevel( Amap_Obj_t * pObj, int Level ) { pObj->Level = Level; }
static inline void Amap_ObjSetCopy( Amap_Obj_t * pObj, void * pCopy ) { pObj->pData = pCopy; }
static inline Amap_Obj_t * Amap_ObjChoice( Amap_Man_t * p, Amap_Obj_t * pObj ) { return pObj->Equiv? Amap_ManObj(p, pObj->Equiv) : NULL; }
-static inline void Amap_ObjSetChoice( Amap_Obj_t * pObj, Amap_Obj_t * pEqu){ assert(pObj->Equiv==0); pObj->Equiv = pEqu->Id; }
+static inline void Amap_ObjSetChoice( Amap_Obj_t * pObj, Amap_Obj_t * pEqu){ assert(pObj->Equiv==0); if (pObj->Id != pEqu->Id) pObj->Equiv = pEqu->Id; }
static inline int Amap_ObjPhaseReal( Amap_Obj_t * pObj ) { return Amap_Regular(pObj)->fPhase ^ Amap_IsComplement(pObj); }
static inline int Amap_ObjRefsTotal( Amap_Obj_t * pObj ) { return pObj->nFouts[0] + pObj->nFouts[1]; }