From 04134389f223759dce9041cb66dc9ae446feba30 Mon Sep 17 00:00:00 2001 From: Lewis Van Winkle Date: Wed, 24 Feb 2016 22:56:57 -0600 Subject: [PATCH] Closure bug fix. --- tinyexpr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyexpr.c b/tinyexpr.c index c9b23ec..0e281e1 100644 --- a/tinyexpr.c +++ b/tinyexpr.c @@ -404,7 +404,7 @@ double te_eval_closure(const te_expr *n, void *context) { if (!n) return 0.0/0.0; #define TE_FUN(...) ((double(*)(__VA_ARGS__))n->function) -#define M(e) te_eval(n->parameters[e]) +#define M(e) te_eval_closure(n->parameters[e], context) switch(n->type) { case TE_CONSTANT: return n->value;