ext2spice.c: bugfix esOutputResistor() uses name without initialization

Constification of APIs has shown up this bug.
spcdevOutNode() uses 'name' as a read-only string, used for
EFHNConcatLook() as 'errorStr' which is used to prefix error log
messages.

EFHNConcatLook() will already defer resolving hierName for the message.

So the only useful thing to indicate to the user is the procedure that
was trying to do the lookup.
This commit is contained in:
Darryl L. Miles 2025-07-24 14:36:22 +01:00
parent c6fe62f64a
commit 56598ca0f4
1 changed files with 2 additions and 3 deletions

View File

@ -2304,7 +2304,6 @@ esOutputResistor(
int dscale) /* Device scaling (for split resistors) */
{
float sdM;
char name[12];
/* Resistor is "Rnnn term1 term2 value" */
/* extraction sets two terminals, which are assigned */
@ -2312,9 +2311,9 @@ esOutputResistor(
/* extracted units are Ohms; output is in Ohms */
spcdevOutNode(hierName, term1->dterm_node->efnode_name->efnn_hier,
name, esSpiceF);
"esOutputResistor", esSpiceF);
spcdevOutNode(hierName, term2->dterm_node->efnode_name->efnn_hier,
name, esSpiceF);
"esOutputResistor", esSpiceF);
sdM = getCurDevMult();