inpptree parser, bug fix, segfault due to usage of an unknown function

for example:
B1  1 0  V = {log(2.0, 1.3) + nosuchthing(2.0, 1.3)}
This commit is contained in:
rlar 2015-02-21 15:04:53 +01:00
parent 8e65614d31
commit 788a5e5fa0
2 changed files with 5 additions and 2 deletions

View File

@ -106,7 +106,10 @@ exp:
| '-' exp %prec NEG { $$ = mkfnode("-",$2); }
| TOK_STR '(' nonempty_arglist ')' { $$ = mkfnode($1, $3); txfree((void*)$1); }
| TOK_STR '(' nonempty_arglist ')' { $$ = mkfnode($1, $3);
if (!$$)
YYERROR;
txfree((void*)$1); }
| TOK_pnode

View File

@ -197,7 +197,7 @@ static struct constant {
void
INPgetTree(char **line, INPparseTree ** pt, CKTcircuit *ckt, INPtables * tab)
{
INPparseNode *p;
INPparseNode *p = NULL;
int i, rv;
values = NULL;