From b00825d204f3e4ccdd0a9c86fbe76482a38fbf5b Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 28 May 2016 21:17:46 +0200 Subject: [PATCH] frontend/linear.c, cleanup `com_linearize()' invoke vec_new() for the scale vector too, attempting to unify dvec and vec usage patterns --- src/frontend/linear.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontend/linear.c b/src/frontend/linear.c index 50c33a841..0a9ee4769 100644 --- a/src/frontend/linear.c +++ b/src/frontend/linear.c @@ -62,15 +62,19 @@ com_linearize(wordlist *wl) plot_setcur(new->pl_typename); plot_list = new; len = (int)((tstop - tstart) / tstep + 1.5); + newtime = dvec_alloc(copy(oldtime->v_name), oldtime->v_type, oldtime->v_flags | VF_PERMANENT, len, NULL); - newtime->v_plot = new; for (i = 0, d = tstart; i < len; i++, d += tstep) newtime->v_realdata[i] = d; - new->pl_scale = new->pl_dvecs = newtime; + + newtime->v_plot = new; + vec_new(newtime); + + new->pl_scale = newtime; if (wl) { while (wl) {