From 99e7d1d19357acf9d317d3beababe48d709a7020 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 23 Feb 2012 10:24:01 -0800 Subject: Bug fix in stadard cell library representation. --- src/map/amap/amapPerm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/map/amap/amapPerm.c') diff --git a/src/map/amap/amapPerm.c b/src/map/amap/amapPerm.c index 8af42ca3..7c471ca4 100644 --- a/src/map/amap/amapPerm.c +++ b/src/map/amap/amapPerm.c @@ -159,8 +159,15 @@ Vec_Int_t * Amap_LibDeriveGatePerm_rec( Amap_Lib_t * pLib, Kit_DsdNtk_t * pNtk, iDsdLit = 0; Vec_IntForEachEntry( vNodFanin, iNodFanin, k ) { - if ( iNodFanin == 0 && iDsdLit < Vec_IntSize(vDsdLits) ) + if ( iNodFanin == 0 ) { + if ( iDsdLit >= Vec_IntSize(vDsdLits) ) + { + Vec_IntFree( vPerm ); + Vec_IntFree( vDsdLits ); + Vec_IntFree( vNodFanin ); + return NULL; + } iDsdFanin = Vec_IntEntry( vDsdLits, iDsdLit++ ); Vec_IntPush( vPerm, iDsdFanin ); continue; -- cgit v1.2.3