From ea2934e6441084af4a2d269c219c0e4dfd1f1f2c Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 12 Feb 2018 14:49:55 +0100 Subject: [PATCH] [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. --- src/tinyexpr.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/tinyexpr.c b/src/tinyexpr.c index 9dc0449fa..22f6d3b54 100755 --- a/src/tinyexpr.c +++ b/src/tinyexpr.c @@ -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: