Corrected some errors relating to distributed allocation of node

area and perimeter across devices.  The distributed allocation
was missing for hierarchical output, and the function that
accumulates values per resistance class was initializing by
iterating over device classes, not resistance classes, leading
to a segfault if the number of device classes is larger than the
number of resistance classes.
This commit is contained in:
Tim Edwards 2021-02-25 17:51:12 -05:00
parent 114b9a59f7
commit 4cc09afeac
2 changed files with 3 additions and 1 deletions

View File

@ -1892,6 +1892,8 @@ esHierVisit(hc, cdata)
freeMagic(p);
devMergeList = NULL;
}
else if (esDistrJunct)
EFHierVisitDevs(hcf, devDistJunctHierVisit, (ClientData)NULL);
/* Output devices */
EFHierVisitDevs(hcf, spcdevHierVisit, (ClientData)NULL);

View File

@ -3973,7 +3973,7 @@ update_w(resClass, w, n)
{
(nc->m_w.widths) = (float *)mallocMagic((unsigned)sizeof(float)
* efNumResistClasses);
for (i = 0; i < EFDevNumTypes; i++)
for (i = 0; i < efNumResistClasses; i++)
nc->m_w.widths[i] = 0.0;
}
nc->m_w.widths[resClass] += (float)w;