Corrected issue with the commit of version 8.3.378, which can

cause a crash when extracting some devices like bipolars with
terminals on different plance.
This commit is contained in:
Tim Edwards 2023-03-15 14:36:15 -04:00
parent a2687d4385
commit e9d434597a
2 changed files with 8 additions and 4 deletions

View File

@ -1 +1 @@
8.3.380 8.3.381

View File

@ -2132,6 +2132,8 @@ extOutputDevices(def, transList, outFile)
width /= n; width /= n;
if (n > 1) if (n > 1)
length = extTransRec.tr_gatelen / n; length = extTransRec.tr_gatelen / n;
else if (extTransRec.tr_gatelen < width)
length = extTransRec.tr_gatelen;
else else
{ {
/* Assumption: A device with a single terminal */ /* Assumption: A device with a single terminal */
@ -2175,10 +2177,12 @@ extOutputDevices(def, transList, outFile)
{ {
LinkedBoundary *lb; LinkedBoundary *lb;
extSpecialBounds = (LinkedBoundary **)mallocMagic(n * extSpecialBounds = (LinkedBoundary **)mallocMagic(
extTransRec.tr_nterm *
sizeof(LinkedBoundary *)); sizeof(LinkedBoundary *));
for (i = 0; i < n; i++) extSpecialBounds[i] = NULL; for (i = 0; i < extTransRec.tr_nterm; i++)
extSpecialBounds[i] = NULL;
/* Mark with reg and process each perimeter segment */ /* Mark with reg and process each perimeter segment */
@ -2194,7 +2198,7 @@ extOutputDevices(def, transList, outFile)
/* Free the lists */ /* Free the lists */
for (i = 0; i < n; i++) for (i = 0; i < extTransRec.tr_nterm; i++)
for (lb = extSpecialBounds[i]; lb != NULL; lb = lb->b_next) for (lb = extSpecialBounds[i]; lb != NULL; lb = lb->b_next)
freeMagic((char *)lb); freeMagic((char *)lb);
freeMagic((char *)extSpecialBounds); freeMagic((char *)extSpecialBounds);