mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 06:07:34 +02:00
Added code to avoid a segfault if a resistor or capacitor is
specified without a list of substrate connection types, but the "s=" parameter is used, resulting in an attempt to access a substrate node that does not exist.
This commit is contained in:
@@ -343,7 +343,11 @@ spcHierWriteParams(
|
|||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
fprintf(esSpiceF, " %s=", plist->parm_name);
|
fprintf(esSpiceF, " %s=", plist->parm_name);
|
||||||
/*EFNode *subnodeFlat =*/ spcdevSubstrate(hc->hc_hierName,
|
if (dev->dev_subsnode == NULL)
|
||||||
|
TxError("Error: Device %s missing substrate node!\n",
|
||||||
|
EFDevTypes[dev->dev_type]);
|
||||||
|
else
|
||||||
|
spcdevSubstrate(hc->hc_hierName,
|
||||||
dev->dev_subsnode->efnode_name->efnn_hier,
|
dev->dev_subsnode->efnode_name->efnn_hier,
|
||||||
dev->dev_type, esSpiceF);
|
dev->dev_type, esSpiceF);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user