[tinyexpr] Make unary functions fail with too many arguments

As it turns out, this was, for some reason, actual wanted behavior.

We _don't_ want it, so just remove the code.
This commit is contained in:
Fabian Homborg 2018-02-12 14:49:55 +01:00
parent 7b9c75094c
commit ea2934e644

View file

@ -314,13 +314,6 @@ static te_expr *base(state *s) {
case TE_FUNCTION1:
case TE_CLOSURE1:
ret = new_expr(s->type, 0);
ret->function = s->function;
if (IS_CLOSURE(s->type)) ret->parameters[1] = s->context;
next_token(s);
ret->parameters[0] = power(s);
break;
case TE_FUNCTION2: case TE_FUNCTION3: case TE_FUNCTION4:
case TE_FUNCTION5: case TE_FUNCTION6: case TE_FUNCTION7:
case TE_CLOSURE2: case TE_CLOSURE3: case TE_CLOSURE4: