mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-09-08 14:35:20 +02:00
src/frontend/postcoms.c, bugfix, write/save an xspice `event' node
In function EVTfindvec() XSPICE can create a `dvec' with a non NULL `v_scale' slot. This special scale with name "step" differs from the current plot `pl_scale' slot and triggered ancient buggy code here.
This commit is contained in:
+14
-10
@@ -477,11 +477,13 @@ com_write(wordlist *wl)
|
||||
for (vv = newplot.pl_dvecs; vv; vv = vv->v_next)
|
||||
if (vec_eq(vv, d->v_scale))
|
||||
break;
|
||||
/* We have to grab it... */
|
||||
vv = vec_copy(d->v_scale);
|
||||
vv->v_next = newplot.pl_dvecs;
|
||||
newplot.pl_dvecs = vv;
|
||||
scalefound = TRUE;
|
||||
if (!vv) {
|
||||
/* We have to grab it... */
|
||||
vv = vec_copy(d->v_scale);
|
||||
vv->v_next = newplot.pl_dvecs;
|
||||
newplot.pl_dvecs = vv;
|
||||
scalefound = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -641,11 +643,13 @@ com_write_sparam(wordlist *wl)
|
||||
for (vv = newplot.pl_dvecs; vv; vv = vv->v_next)
|
||||
if (vec_eq(vv, d->v_scale))
|
||||
break;
|
||||
/* We have to grab it... */
|
||||
vv = vec_copy(d->v_scale);
|
||||
vv->v_next = newplot.pl_dvecs;
|
||||
newplot.pl_dvecs = vv;
|
||||
scalefound = TRUE;
|
||||
if (!vv) {
|
||||
/* We have to grab it... */
|
||||
vv = vec_copy(d->v_scale);
|
||||
vv->v_next = newplot.pl_dvecs;
|
||||
newplot.pl_dvecs = vv;
|
||||
scalefound = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!scalefound)
|
||||
|
||||
Reference in New Issue
Block a user