Browse Source

restrict removal of arg only to comma operator,

otherwise functions with a single variable may fail
pre-master-46
Holger Vogt 6 years ago
parent
commit
d3fcf2f43f
  1. 3
      src/frontend/parse.c

3
src/frontend/parse.c

@ -307,7 +307,10 @@ struct pnode *PP_mkfnode(const char *func, struct pnode *arg)
/* Give the user-defined functions a try. */
q = ft_substdef(func, arg);
if (q) { /* found */
/* remove only the old comma operator pnode, no longer used */
if (arg->pn_op && arg->pn_op->op_num == PT_OP_COMMA) {
free_pnode(arg);
}
return q;
}
}

Loading…
Cancel
Save