summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-12-07 22:56:29 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2015-12-07 22:56:29 -0800
commite8f459d85f88a0516dfa2284fb96dd8178b17ba9 (patch)
treec139c6dd83f7e43374647b3ab727b4b015b2c2ac
parent64afe6e9f861f8c570ba68c3a2d47ec92ebad96f (diff)
downloadabc-e8f459d85f88a0516dfa2284fb96dd8178b17ba9.tar.gz
abc-e8f459d85f88a0516dfa2284fb96dd8178b17ba9.tar.bz2
abc-e8f459d85f88a0516dfa2284fb96dd8178b17ba9.zip
Extending Verilog parser to handle 'default' in the case-statement (bug fix).
-rw-r--r--src/base/wlc/wlcReadVer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base/wlc/wlcReadVer.c b/src/base/wlc/wlcReadVer.c
index dcafc014..eb704211 100644
--- a/src/base/wlc/wlcReadVer.c
+++ b/src/base/wlc/wlcReadVer.c
@@ -1085,7 +1085,10 @@ startword:
if ( fDefaultFound )
{
int EntryLast = Vec_IntEntryLast( p->vFanins );
- Vec_IntFillExtra( p->vFanins, nValues + 1, EntryLast );
+ if (nValues != Vec_IntSize(p->vFanins)-2)
+ Vec_IntFillExtra( p->vFanins, nValues + 1, EntryLast );
+ else
+ Vec_IntPop(p->vFanins);
// get next line and check its opening character
pStart = Wlc_PrsStr(p, Vec_IntEntry(p->vStarts, ++i));
pStart = Wlc_PrsSkipSpaces( pStart );