fix: lef write crash (when cells with labels in space pNum==-1)

The issue here is can pNum==-1 which causes a crash.
This commit is contained in:
Darryl L. Miles
2024-10-01 12:43:27 -04:00
committed by Tim Edwards
parent 18a4dddc2b
commit 3638d382d6
+8 -4
View File
@@ -1591,8 +1591,10 @@ lefWriteMacro(def, f, scale, setback, pinonly, toplayer, domaster)
/* disappear by being inside the setback area. */
pNum = DBPlane(lab->lab_type);
DBPaintPlane(SelectDef->cd_planes[pNum], &labr,
DBStdPaintTbl(lab->lab_type, pNum), (PaintUndoInfo *) NULL);
if (pNum >= 0) // ignore labels in space
DBPaintPlane(SelectDef->cd_planes[pNum], &labr,
DBStdPaintTbl(lab->lab_type, pNum),
(PaintUndoInfo *) NULL);
}
else
{
@@ -1607,8 +1609,10 @@ lefWriteMacro(def, f, scale, setback, pinonly, toplayer, domaster)
/* disappear by being inside the setback area. */
pNum = DBPlane(lab->lab_type);
DBPaintPlane(SelectDef->cd_planes[pNum], &labr,
DBStdPaintTbl(lab->lab_type, pNum), (PaintUndoInfo *) NULL);
if (pNum >= 0) // ignore labels in space
DBPaintPlane(SelectDef->cd_planes[pNum], &labr,
DBStdPaintTbl(lab->lab_type, pNum),
(PaintUndoInfo *) NULL);
}
}