Skip to content

Commit

Permalink
Fix for GitHub issue #152 - segfault on gate connection syntax error.
Browse files Browse the repository at this point in the history
If there is a syntax error in the source code, pform_makegate may be
passed a null list of port connections. The error is already reported,
so we just need to ignore it.

(cherry picked from commit 8a5cbd4)
  • Loading branch information
martinwhitaker committed Apr 21, 2017
1 parent 177ae7c commit 8ab100c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pform.cc
Expand Up @@ -2138,9 +2138,11 @@ static void pform_makegate(PGBuiltin::Type type,
return;
}

for (list<PExpr*>::iterator cur = info.parms->begin()
; cur != info.parms->end() ; ++cur) {
pform_declare_implicit_nets(*cur);
if (info.parms) {
for (list<PExpr*>::iterator cur = info.parms->begin()
; cur != info.parms->end() ; ++cur) {
pform_declare_implicit_nets(*cur);
}
}

perm_string dev_name = lex_strings.make(info.name);
Expand Down

0 comments on commit 8ab100c

Please sign in to comment.