Changed the size of argv[] in efReadLine() to be 128 instead of

64 because I overran the 64 array with too many resistclasses in
a techfile.  This really should be dynamically allocated;  this
requires parsing the line to count tokens and reallocating as
needed (to be done).
This commit is contained in:
Tim Edwards 2019-06-06 14:53:07 -04:00
parent 51b70f6577
commit 53078588ae
3 changed files with 4 additions and 3 deletions

View File

@ -1685,6 +1685,7 @@ topVisit(def, doStub)
EFNodeName *unnumbered;
sname = (EFNodeName *) HashGetValue(he);
if (sname == NULL) continue; /* Should not happen */
snode = sname->efnn_node;
if (!(snode->efnode_flags & EF_PORT)) continue;

View File

@ -223,8 +223,8 @@ efAdjustSubCap(def, nodeName, nodeCapAdjust)
EFNode *node;
HashEntry *he;
he = HashFind(&def->def_nodes, nodeName);
if (nodename = (EFNodeName *) HashGetValue(he))
he = HashLookOnly(&def->def_nodes, nodeName);
if (he && (nodename = (EFNodeName *) HashGetValue(he)))
{
node = nodename->efnn_node;
node->efnode_cap += (EFCapValue) nodeCapAdjust;

View File

@ -174,7 +174,7 @@ efReadDef(def, dosubckt, resist, noscale, toplevel)
int argc, ac, n;
CellDef *dbdef;
EFCapValue cap;
char line[1024], *argv[64], *name, *attrs;
char line[1024], *argv[128], *name, *attrs;
int rscale = 1; /* Multiply resistances by this */
int cscale = 1; /* Multiply capacitances by this */
float lscale = 1.0; /* Multiply lambda by this */