Corrects an error that can cause "extresist" to segfault. This is
due to moving away from using the node "location" in favor of a drivepoint specified by a port or other connection point. The "location" record can end up at the default value of "infinity", and should not be used to set the area for searches. This fix is in response to issue #502 on the github issue tracker, submitted by Julian Schwarz.
This commit is contained in:
parent
d0e38df6bf
commit
df4ec3ab32
|
|
@ -1054,11 +1054,24 @@ ResExtractNet(node, resisdata, cellname)
|
|||
|
||||
/* Copy Paint */
|
||||
|
||||
scx.scx_area.r_ll.p_x = node->location.p_x - 2;
|
||||
scx.scx_area.r_ll.p_y = node->location.p_y - 2;
|
||||
scx.scx_area.r_ur.p_x = node->location.p_x + 2;
|
||||
scx.scx_area.r_ur.p_y = node->location.p_y + 2;
|
||||
startpoint = node->location;
|
||||
/* If the node location is INFINITY, then use the rs_bbox */
|
||||
|
||||
if ((node->location.p_x == INFINITY) || (node->location.p_y == INFINITY))
|
||||
{
|
||||
scx.scx_area.r_ll.p_x = node->rs_bbox.r_xbot;
|
||||
scx.scx_area.r_ll.p_y = node->rs_bbox.r_ybot;
|
||||
scx.scx_area.r_ur.p_x = node->rs_bbox.r_xtop;
|
||||
scx.scx_area.r_ur.p_y = node->rs_bbox.r_ytop;
|
||||
startpoint = node->drivepoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
scx.scx_area.r_ll.p_x = node->location.p_x - 2;
|
||||
scx.scx_area.r_ll.p_y = node->location.p_y - 2;
|
||||
scx.scx_area.r_ur.p_x = node->location.p_x + 2;
|
||||
scx.scx_area.r_ur.p_y = node->location.p_y + 2;
|
||||
startpoint = node->location;
|
||||
}
|
||||
|
||||
/* Because node->type might come from a label with a sticky type
|
||||
* that does not correspond exactly to the layer underneath, include
|
||||
|
|
|
|||
Loading…
Reference in New Issue