From 155b6134a837288f327b7afb962802a5500860b5 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sun, 9 Dec 2012 13:12:10 +0100 Subject: [PATCH] apply_func(), use arg->pn_value->v_name instead of recreated name --- src/frontend/evaluate.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/frontend/evaluate.c b/src/frontend/evaluate.c index fec9bf004..48fca0960 100644 --- a/src/frontend/evaluate.c +++ b/src/frontend/evaluate.c @@ -893,7 +893,6 @@ apply_func(struct func *func, struct pnode *arg) int len, i; short type; void *data; - char buf[BSIZE_SP]; /* Special case. This is not good -- happens when vm(), etc are used * and it gets caught as a user-definable function. Usually v() @@ -904,10 +903,9 @@ apply_func(struct func *func, struct pnode *arg) fprintf(cp_err, "Error: bad v() syntax\n"); return (NULL); } - (void) sprintf(buf, "v(%s)", arg->pn_value->v_name); - t = vec_fromplot(buf, plot_cur); + t = vec_fromplot(arg->pn_value->v_name, plot_cur); if (!t) { - fprintf(cp_err, "Error: no such vector %s\n", buf); + fprintf(cp_err, "Error: no such vector %s\n", arg->pn_value->v_name); return (NULL); } t = vec_copy(t);