apply_func(), use arg->pn_value->v_name instead of recreated name
This commit is contained in:
parent
aac7c1d4be
commit
155b6134a8
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue