mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 18:02:52 +02:00
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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user