From c3cf6c37654e076ffd7dac77e2488ca13fc03164 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 25 Jun 2021 12:35:11 -0400 Subject: [PATCH] Made another correction that prevents netgen from truncating the pin list that it prints in the side-by-side element mismatch comparison for an element, when there is no node record associated with the pin connection. This makes the output clearer. --- base/netcmp.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/base/netcmp.c b/base/netcmp.c index 6bdd803..ed989bc 100644 --- a/base/netcmp.c +++ b/base/netcmp.c @@ -620,15 +620,16 @@ struct FormattedList *FormatBadElementFragment(struct Element *E) for (elems = nodes[i]->node->elementlist; elems != NULL; elems = elems->next) count++; - - elemlist->flist[k].count = count; - if (*ob->name != *ob->instance.name) // e.g., "port_match_error" - elemlist->flist[k].name = ob->name; - else - elemlist->flist[k].name = ob->name + strlen(ob->instance.name) + 1; - elemlist->flist[k].permute = (char)1; - k++; } + else count = 1; + + elemlist->flist[k].count = count; + if (*ob->name != *ob->instance.name) // e.g., "port_match_error" + elemlist->flist[k].name = ob->name; + else + elemlist->flist[k].name = ob->name + strlen(ob->instance.name) + 1; + elemlist->flist[k].permute = (char)1; + k++; } else { /* handle multiple permutable pins */ struct objlist *ob2; @@ -665,13 +666,16 @@ struct FormattedList *FormatBadElementFragment(struct Element *E) struct ElementList *elems; count = 0; - if (nodes[j]->node == NULL) continue; // ? - for (elems = nodes[j]->node->elementlist; elems != NULL; - elems = elems->next) - count++; + if (nodes[j]->node == NULL) /* Under what condition is the node NULL? */ + count++; + else { + for (elems = nodes[j]->node->elementlist; elems != NULL; + elems = elems->next) + count++; + } if (count >= maxcount) { - maxcount = count; - maxindex = j; + maxcount = count; + maxindex = j; } } }