diff options
-rw-r--r-- | src/misc/util/utilNam.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/misc/util/utilNam.c b/src/misc/util/utilNam.c index 7b8ea738..ccea6322 100644 --- a/src/misc/util/utilNam.c +++ b/src/misc/util/utilNam.c @@ -359,9 +359,15 @@ int Abc_NamStrFind( Abc_Nam_t * p, char * pStr ) ***********************************************************************/ int Abc_NamStrFindOrAdd( Abc_Nam_t * p, char * pStr, int * pfFound ) { - int iHandleNew; + int i, iHandleNew; int *piPlace; - assert( pStr[0] != '\\' || pStr[strlen(pStr)-1] == ' ' ); + if ( !(pStr[0] != '\\' || pStr[strlen(pStr)-1] == ' ') ) + { + for ( i = strlen(pStr) - 1; i >= 0; i-- ) + if ( *pStr == ' ' ) + break; + assert( i < (int)strlen(pStr) ); + } piPlace = Abc_NamStrHashFind( p, pStr ); if ( *piPlace ) { |