Corrected an error with the new "extresist" code which fails to set

the location of a node which was previously read as a port.  But
the port location was not set when reading the port, only the
drivepoint, so the location is undefined and can cause a program
crash.
This commit is contained in:
R. Timothy Edwards 2026-02-05 17:57:43 -05:00
parent e2292f5d70
commit 10a6c8635f
1 changed files with 4 additions and 3 deletions

View File

@ -202,13 +202,14 @@ ResReadNode(int argc, char *argv[])
entry = HashFind(&ResNodeTable, argv[NODES_NODENAME]);
node = ResExtInitNode(entry);
node->location.p_x = atoi(argv[NODES_NODEX]);
node->location.p_y = atoi(argv[NODES_NODEY]);
/* If this node was previously read as a port, then don't change the
* location.
* node type, which is tracking the type at the drivepoint.
*/
if (!(node->status & PORTNODE))
{
node->location.p_x = atoi(argv[NODES_NODEX]);
node->location.p_y = atoi(argv[NODES_NODEY]);
node->type = DBTechNameType(argv[NODES_NODETYPE]);
}