inp.c, bug fix, commit "allow 'temper' keyword in .param, .model and device instance lines ..."

don't overwrite struct pt_temper.expression,
  to allow free'ing this string.
This commit is contained in:
rlar 2017-03-30 19:55:20 +02:00
parent 648de2a001
commit 12de713ff5
1 changed files with 8 additions and 4 deletions

View File

@ -1564,11 +1564,15 @@ inp_parse_temper_trees(void)
{
struct pt_temper *d;
for(d = devtlist; d; d = d->next)
INPgetTree(&d->expression, &d->pt, ft_curckt->ci_ckt, NULL);
for(d = devtlist; d; d = d->next) {
char *expression = d->expression;
INPgetTree(&expression, &d->pt, ft_curckt->ci_ckt, NULL);
}
for(d = modtlist; d; d = d->next)
INPgetTree(&d->expression, &d->pt, ft_curckt->ci_ckt, NULL);
for(d = modtlist; d; d = d->next) {
char *expression = d->expression;
INPgetTree(&expression, &d->pt, ft_curckt->ci_ckt, NULL);
}
}