Corrected error caused by empty string labels in GDS input; when

a cell is flattened, these were getting the hierarchy prepended
and therefore became non-NULL and tending to screw up things
generally.
This commit is contained in:
Tim Edwards 2021-01-07 21:47:16 -05:00
parent 67d0d8c3f0
commit feeeccecda
3 changed files with 11 additions and 1 deletions

View File

@ -1869,6 +1869,9 @@ flatCopyAllLabels(scx, lab, tpath, targetUse)
char labelname[1024];
char *n, *f, c;
/* Ignore null labels */
if (*lab->lab_text == '\0') return 0;
def = targetUse->cu_def;
if (!GEO_LABEL_IN_AREA(&lab->lab_rect, &(scx->scx_area))) return 0;
GeoTransRect(&scx->scx_trans, &lab->lab_rect, &labTargetRect);

View File

@ -656,7 +656,7 @@ typedef struct treeFilter
#define TF_LABEL_ATTACH_CORNER 0x3C /* Mask of the four types above */
/* To do: Make the tpath entries dynamically allocated */
#define FLATTERMSIZE 1024 /* Used for generating flattened labels */
#define FLATTERMSIZE 4096 /* Used for generating flattened labels */
/* -------------- Undo information passed to DBPaintPlane ------------- */

View File

@ -350,6 +350,13 @@ esOutputHierResistor(hc, dev, scale, term1, term2, has_model, l, w, dscale)
/* term1=gate term2=source by the above code. */
/* extracted units are Ohms; output is in Ohms */
if ((term1->dterm_node == NULL) || (term2->dterm_node == NULL))
{
TxError("Error: Resistor %s missing terminal node!\n",
EFDevTypes[dev->dev_type]);
return;
}
spcdevOutNode(hc->hc_hierName, term1->dterm_node->efnode_name->efnn_hier,
"res_top", esSpiceF);
spcdevOutNode(hc->hc_hierName, term2->dterm_node->efnode_name->efnn_hier,