Browse Source

apply_func(), use arg->pn_value->v_name instead of recreated name

pre-master-46
h_vogt 13 years ago
committed by rlar
parent
commit
155b6134a8
  1. 6
      src/frontend/evaluate.c

6
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);

Loading…
Cancel
Save