From e8f459d85f88a0516dfa2284fb96dd8178b17ba9 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 7 Dec 2015 22:56:29 -0800 Subject: Extending Verilog parser to handle 'default' in the case-statement (bug fix). --- src/base/wlc/wlcReadVer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ); -- cgit v1.2.3