mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-29 01:04:55 +02:00
restrict removal of arg only to comma operator,
otherwise functions with a single variable may fail
This commit is contained in:
@@ -307,7 +307,10 @@ struct pnode *PP_mkfnode(const char *func, struct pnode *arg)
|
||||
/* Give the user-defined functions a try. */
|
||||
q = ft_substdef(func, arg);
|
||||
if (q) { /* found */
|
||||
free_pnode(arg);
|
||||
/* remove only the old comma operator pnode, no longer used */
|
||||
if (arg->pn_op && arg->pn_op->op_num == PT_OP_COMMA) {
|
||||
free_pnode(arg);
|
||||
}
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user