Corrected an error in the flattening routine that will cause the

"flatten" command to crash if there are black-box subcircuits in
the netlist.
This commit is contained in:
Tim Edwards 2023-10-27 10:35:27 -04:00
parent cc84364263
commit 6d23844483
1 changed files with 2 additions and 3 deletions

View File

@ -136,17 +136,16 @@ void flattenCell(char *name, int file)
ob2 = ob2->next;
}
/* delete all port elements from child */
while (IsPort(ChildObjList)) {
/* delete all ports at beginning of list */
if (Debug) Printf("deleting leading port from child\n");
tmp = ChildObjList->next;
FreeObjectAndHash(ChildObjList, ChildCell);
ChildObjList = tmp;
if ((ChildObjList = tmp) == NULL) break;
}
tmp = ChildObjList;
while (tmp->next != NULL) {
while (tmp && (tmp->next != NULL)) {
if (IsPort(tmp->next)) {
ob2 = (tmp->next)->next;
if (Debug) Printf("deleting a port from child\n");